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 @@ -200,16 +200,21 @@ fn test_new_with_duplicate_tx() {
200
200
#[ rstest]
201
201
fn test_add_tx_with_duplicate_tx ( mut mempool : Mempool ) {
202
202
let input = add_tx_input ! ( tip: 50 , tx_hash: Felt :: ONE ) ;
203
- let same_input = input. clone ( ) ;
203
+ let duplicate_input = input. clone ( ) ;
204
204
205
205
add_tx ( & mut mempool, & input) ;
206
206
207
207
assert_matches ! (
208
- mempool. add_tx( same_input . clone ( ) ) ,
208
+ mempool. add_tx( duplicate_input ) ,
209
209
Err ( MempoolError :: DuplicateTransaction { .. } )
210
210
) ;
211
- // Assert that the original tx remains in the pool after the failed attempt.
212
- assert_eq_mempool_queue ( & mempool, & [ same_input. tx ] )
211
+
212
+ // Assert that the original tx remains in Mempool after the failed attempt.
213
+ let queue_txs = [ TransactionReference :: new ( & input. tx ) ] ;
214
+ let pool_txs = [ input. tx ] ;
215
+ let mempool_state = MempoolState :: new ( pool_txs, queue_txs) ;
216
+
217
+ mempool_state. assert_eq_mempool_state ( & mempool) ;
213
218
}
214
219
215
220
#[ rstest]
You can’t perform that action at this time.
0 commit comments