File tree 1 file changed +9
-4
lines changed
1 file changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -224,16 +224,21 @@ fn test_new_with_duplicate_tx() {
224
224
#[ rstest]
225
225
fn test_add_tx_with_duplicate_tx ( mut mempool : Mempool ) {
226
226
let input = add_tx_input ! ( tip: 50 , tx_hash: Felt :: ONE ) ;
227
- let same_input = input. clone ( ) ;
227
+ let duplicate_input = input. clone ( ) ;
228
228
229
229
add_tx ( & mut mempool, & input) ;
230
230
231
231
assert_matches ! (
232
- mempool. add_tx( same_input . clone ( ) ) ,
232
+ mempool. add_tx( duplicate_input ) ,
233
233
Err ( MempoolError :: DuplicateTransaction { .. } )
234
234
) ;
235
- // Assert that the original tx remains in the pool after the failed attempt.
236
- assert_eq_mempool_queue ( & mempool, & [ same_input. tx ] )
235
+
236
+ // Assert that the original tx remains in Mempool after the failed attempt.
237
+ let queue_txs = [ TransactionReference :: new ( & input. tx ) ] ;
238
+ let pool_txs = [ input. tx ] ;
239
+ let expected_mempool_state = MempoolState :: new ( pool_txs, queue_txs) ;
240
+
241
+ expected_mempool_state. assert_eq_mempool_state ( & mempool) ;
237
242
}
238
243
239
244
#[ rstest]
You can’t perform that action at this time.
0 commit comments