Skip to content

Commit

Permalink
Fix fee check
Browse files Browse the repository at this point in the history
  • Loading branch information
raychu86 committed Feb 13, 2023
1 parent 2374ad1 commit 74eed37
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion node/consensus/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -612,7 +612,7 @@ impl<N: Network, C: ConsensusStorage<N>> Consensus<N, C> {

// Ensure transactions with a positive balance must pay for its storage in bytes.
let fee = transaction.fee()?;
if fee.is_positive() && transaction.to_bytes_le()?.len() > usize::try_from(fee)? {
if fee >= 0 && transaction.to_bytes_le()?.len() > usize::try_from(fee)? {
bail!("Transaction '{transaction_id}' has insufficient fee to cover its storage in bytes")
}

Expand Down

0 comments on commit 74eed37

Please sign in to comment.