From cc76b40885215fa1903ad26349583ac863f22f54 Mon Sep 17 00:00:00 2001 From: Arya Date: Tue, 15 Oct 2024 22:42:54 -0400 Subject: [PATCH] Documents the new argument in `Storage::insert()`, updates outdated comment --- zebrad/src/components/mempool/storage.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/zebrad/src/components/mempool/storage.rs b/zebrad/src/components/mempool/storage.rs index 05499581d4c..a7c98d66bad 100644 --- a/zebrad/src/components/mempool/storage.rs +++ b/zebrad/src/components/mempool/storage.rs @@ -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. @@ -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()); }