[base-node] Update mempool consensus validator to check weight excluding coinbase
Thanks to for pointing out that the mempool consensus
validator needs to check against the max block weight excluding
space for a coinbase utxo and kernel.
@@ -74,7 +74,7 @@ impl<B: BlockchainBackend> MempoolTransactionValidation for TxConsensusValidator
fn validate(&self, tx: &Transaction) -> Result<(), ValidationError> {
let consensus_constants = self.db.consensus_constants()?;
// validate maximum tx weight
- if tx.calculate_weight() > consensus_constants.get_max_block_transaction_weight() {
+ if tx.calculate_weight() > consensus_constants.get_max_block_weight_excluding_coinbase() {
return Err(ValidationError::MaxTransactionWeightExceeded);
}
