From 8e03a9f9baf6a5d489d53b088e5538529b3e421c Mon Sep 17 00:00:00 2001 From: Andrew Date: Thu, 4 Dec 2025 09:02:21 +0000 Subject: [PATCH] uncomment validity checks --- crates/iota-types/src/transaction.rs | 35 +++++++++++++--------------- 1 file changed, 16 insertions(+), 19 deletions(-) diff --git a/crates/iota-types/src/transaction.rs b/crates/iota-types/src/transaction.rs index b087d8922d1..433886bc75d 100644 --- a/crates/iota-types/src/transaction.rs +++ b/crates/iota-types/src/transaction.rs @@ -620,12 +620,11 @@ impl EndOfEpochTransactionKind { "selecting committee only among validators supporting the protocol version not supported".to_string(), )); } - // This has to be uncommented before merging to develop - // if config.score_based_rewards() { - // return Err(UserInputError::Unsupported( - // "score based rewards enabled and - // required".to_string(), )); - // } + if config.score_based_rewards() { + return Err(UserInputError::Unsupported( + "score based rewards should not be enabled".to_string(), + )); + } } Self::ChangeEpochV2(_) => { if !config.protocol_defined_base_fee() { @@ -638,12 +637,11 @@ impl EndOfEpochTransactionKind { "selecting committee only among validators supporting the protocol version not supported".to_string(), )); } - // This has to be uncommented before merging to develop - // if config.score_based_rewards() { - // return Err(UserInputError::Unsupported( - // "score based rewards enabled and - // required".to_string(), )); - // } + if config.score_based_rewards() { + return Err(UserInputError::Unsupported( + "score based rewards should not be enabled".to_string(), + )); + } } Self::ChangeEpochV3(_) => { if !config.protocol_defined_base_fee() { @@ -656,12 +654,11 @@ impl EndOfEpochTransactionKind { "selecting committee only among validators supporting the protocol version required".to_string(), )); } - // This has to be uncommented before merging to develop - // if config.score_based_rewards() { - // return Err(UserInputError::Unsupported( - // "score based rewards enabled and - // required".to_string(), )); - // } + if config.score_based_rewards() { + return Err(UserInputError::Unsupported( + "score based rewards should not be enabled".to_string(), + )); + } } Self::ChangeEpochV4(_) => { if !config.protocol_defined_base_fee() { @@ -676,7 +673,7 @@ impl EndOfEpochTransactionKind { } if !config.score_based_rewards() { return Err(UserInputError::Unsupported( - "score based rewards not enabled".to_string(), + "score based rewards should be enabled".to_string(), )); } }