diff --git a/mining/errors/src/mempool.rs b/mining/errors/src/mempool.rs index 43bf4a5119..132f7e2fd7 100644 --- a/mining/errors/src/mempool.rs +++ b/mining/errors/src/mempool.rs @@ -82,7 +82,7 @@ pub enum RuleError { #[error("Rejected tx {0} from mempool due to incomputable storage mass")] RejectStorageMassIncomputable(TransactionId), - #[error("Rejected RBF tx {0} from the mempool for having an unreasonably high fee of {1} sompi, indicating a possible user error. Use fee <= 50 KAS, or increase over previous feerate by 2x at most.")] + #[error("(PNN only) Rejected RBF tx {0} from the mempool for having an unreasonably high fee of {1} sompi, indicating a possible user error. Use fee <= 50 KAS, or increase over previous feerate by 2x at most.")] RejectRbfUserError(TransactionId, u64), } diff --git a/mining/src/mempool/replace_by_fee.rs b/mining/src/mempool/replace_by_fee.rs index 257a079816..1650035e74 100644 --- a/mining/src/mempool/replace_by_fee.rs +++ b/mining/src/mempool/replace_by_fee.rs @@ -8,6 +8,7 @@ use kaspa_consensus_core::{ constants::SOMPI_PER_KASPA, tx::{MutableTransaction, Transaction}, }; +use kaspa_core::warn; use std::sync::Arc; impl Mempool { @@ -165,7 +166,9 @@ impl Mempool { { if transaction_feerate > double_spend_feerate { if transaction.calculated_fee.unwrap() > SOMPI_PER_KASPA * 50 && transaction_feerate > double_spend_feerate * 2.0 { - return Err(RuleError::RejectRbfUserError(transaction.id(), transaction.calculated_fee.unwrap())); + let err = RuleError::RejectRbfUserError(transaction.id(), transaction.calculated_fee.unwrap()); + warn!("Mempool RBF high fee guard: {err} ({}, {})", transaction_feerate, double_spend_feerate); + return Err(err); } return Ok(owner); } else {