This repository was archived by the owner on Jan 12, 2026. It is now read-only.
File tree Expand file tree Collapse file tree
crates/op-rbuilder/src/tests/framework Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -448,24 +448,23 @@ impl FlashblocksListener {
448448
449449 /// Check if any flashblock contains the given transaction hash
450450 pub fn contains_transaction ( & self , tx_hash : & B256 ) -> bool {
451- let tx_hash_str = format ! ( "{tx_hash:#x}" ) ;
452451 self . flashblocks . lock ( ) . iter ( ) . any ( |fb| {
453- if let Some ( receipts) = fb. metadata . get ( "receipts" )
454- && let Some ( receipts_obj) = receipts. as_object ( )
455- {
456- return receipts_obj. contains_key ( & tx_hash_str) ;
457- }
458- false
452+ fb. diff
453+ . transactions
454+ . iter ( )
455+ . any ( |tx| keccak256 ( tx) == * tx_hash)
459456 } )
460457 }
461458
462459 /// Find which flashblock index contains the given transaction hash
463460 pub fn find_transaction_flashblock ( & self , tx_hash : & B256 ) -> Option < u64 > {
464- let tx_hash_str = format ! ( "{tx_hash:#x}" ) ;
465461 self . flashblocks . lock ( ) . iter ( ) . find_map ( |fb| {
466- if let Some ( receipts) = fb. metadata . get ( "receipts" )
467- && let Some ( receipts_obj) = receipts. as_object ( )
468- && receipts_obj. contains_key ( & tx_hash_str)
462+ if fb
463+ . diff
464+ . transactions
465+ . iter ( )
466+ . find ( |tx| keccak256 ( tx) == * tx_hash)
467+ . is_some ( )
469468 {
470469 return Some ( fb. index ) ;
471470 }
You can’t perform that action at this time.
0 commit comments