Skip to content

Commit

Permalink
Documents the new argument in Storage::insert(), updates outdated c…
Browse files Browse the repository at this point in the history
…omment
  • Loading branch information
arya2 committed Oct 16, 2024
1 parent f897489 commit cc76b40
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion zebrad/src/components/mempool/storage.rs
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,10 @@ impl Storage {

/// Insert a [`VerifiedUnminedTx`] into the mempool, caching any rejections.
///
/// Accepts the [`VerifiedUnminedTx`] being inserted and `spent_mempool_outpoints`,
/// a list of transparent inputs of the provided [`VerifiedUnminedTx`] that were found
/// as newly created transparent outputs in the mempool during transaction verification.
///
/// Returns an error if the mempool's verified transactions or rejection caches
/// prevent this transaction from being inserted.
/// These errors should not be propagated to peers, because the transactions are valid.
Expand Down Expand Up @@ -282,7 +286,6 @@ impl Storage {
);

// If this transaction gets evicted, set its result to the same error
// (we could return here, but we still want to check the mempool size)
if victim_tx.transaction.id == unmined_tx_id {
result = Err(SameEffectsChainRejectionError::RandomlyEvicted.into());
}
Expand Down

0 comments on commit cc76b40

Please sign in to comment.