diff --git a/core-rust-bridge/src/main/java/com/radixdlt/mempool/MempoolError.java b/core-rust-bridge/src/main/java/com/radixdlt/mempool/MempoolError.java index e41470666a..38a6b154e4 100644 --- a/core-rust-bridge/src/main/java/com/radixdlt/mempool/MempoolError.java +++ b/core-rust-bridge/src/main/java/com/radixdlt/mempool/MempoolError.java @@ -78,7 +78,7 @@ static void registerCodec(CodecMap codecMap) { codecs -> EnumCodec.fromPermittedRecordSubclasses(MempoolError.class, codecs)); } - record PriorityThresholdNotMet(Option minTipPercentageRequired, UInt32 tipPercentage) + record PriorityThresholdNotMet(Option minTipBasisPointsRequired, UInt32 tipBasisPoints) implements MempoolError {} record Duplicate(HashCode notarizedTransactionHash) implements MempoolError {} diff --git a/core-rust-bridge/src/main/java/com/radixdlt/mempool/RustMempool.java b/core-rust-bridge/src/main/java/com/radixdlt/mempool/RustMempool.java index cd21d7cc9f..c4c20197e0 100644 --- a/core-rust-bridge/src/main/java/com/radixdlt/mempool/RustMempool.java +++ b/core-rust-bridge/src/main/java/com/radixdlt/mempool/RustMempool.java @@ -119,9 +119,9 @@ public void addTransaction(RawNotarizedTransaction transaction) throws MempoolRe case MempoolError.PriorityThresholdNotMet e -> throw new MempoolPriorityThresholdNotMetException( String.format( - "Mempool is full and transaction's priority threshold not met, min tip percentage" + "Mempool is full and transaction's priority threshold not met, min tip basis points" + " required: %s", - e.minTipPercentageRequired())); + e.minTipBasisPointsRequired())); case MempoolError.Duplicate e -> throw new MempoolDuplicateException( String.format( "Mempool already has transaction with notarized hash %s", diff --git a/core-rust/state-manager/src/jni/mempool.rs b/core-rust/state-manager/src/jni/mempool.rs index 8a8e25d15d..db4ab6dab9 100644 --- a/core-rust/state-manager/src/jni/mempool.rs +++ b/core-rust/state-manager/src/jni/mempool.rs @@ -193,7 +193,7 @@ impl From> for JavaPreparedNotarizedTransaction { enum MempoolAddErrorJava { PriorityThresholdNotMet { min_tip_percentage_required: Option, - tip_percentage: u32, + tip_basis_points: u32, }, Duplicate(NotarizedTransactionHash), TransactionValidationError(String), @@ -205,10 +205,10 @@ impl From for MempoolAddErrorJava { match err { MempoolAddError::PriorityThresholdNotMet { min_tip_basis_points_required: min_tip_percentage_required, - tip_basis_points: tip_percentage, + tip_basis_points, } => MempoolAddErrorJava::PriorityThresholdNotMet { min_tip_percentage_required, - tip_percentage, + tip_basis_points, }, MempoolAddError::Duplicate(hash) => MempoolAddErrorJava::Duplicate(hash), MempoolAddError::Rejected(rejection) => { diff --git a/core-rust/state-manager/src/mempool/mod.rs b/core-rust/state-manager/src/mempool/mod.rs index 5dfc22bcb1..5f98265f9a 100644 --- a/core-rust/state-manager/src/mempool/mod.rs +++ b/core-rust/state-manager/src/mempool/mod.rs @@ -151,14 +151,14 @@ impl Display for MempoolAddError { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { match self { MempoolAddError::PriorityThresholdNotMet { - min_tip_basis_points_required: min_tip_percentage_required, - tip_basis_points: tip_percentage, - } => match min_tip_percentage_required { + min_tip_basis_points_required, + tip_basis_points, + } => match min_tip_basis_points_required { None => { write!(f, "Priority Threshold not met. There is no known tip to guarantee mempool submission.") } Some(min_tip_percentage_required) => { - write!(f, "Priority Threshold not met: tip is {tip_percentage} while min tip required {min_tip_percentage_required}") + write!(f, "Priority Threshold not met: tip is {tip_basis_points} basis points while min tip required {min_tip_percentage_required} basis points") } }, MempoolAddError::Duplicate(_) => write!(f, "Duplicate Entry"), diff --git a/core-rust/state-manager/src/protocol/test.rs b/core-rust/state-manager/src/protocol/test.rs index f166658e8a..dceb5bd187 100644 --- a/core-rust/state-manager/src/protocol/test.rs +++ b/core-rust/state-manager/src/protocol/test.rs @@ -99,7 +99,7 @@ fn flash_protocol_update_test() { .transactions .remove(0); let ProtocolUpdateTransaction::FlashTransactionV1(flash) = validator_fee_fix else { - panic!(); + panic!("Anenome validator fee fix is known to be a FlashTransactionV1"); }; flash.state_updates };