File tree Expand file tree Collapse file tree 4 files changed +14
-14
lines changed
Expand file tree Collapse file tree 4 files changed +14
-14
lines changed Original file line number Diff line number Diff line change @@ -589,8 +589,8 @@ impl TransactionInfo for Client {
589589 self . transaction_address ( id) . map ( |addr| addr. block_hash )
590590 }
591591
592- fn transaction_header ( & self , hash : & H256 ) -> Option < :: encoded:: Header > {
593- self . transaction_addresses ( hash )
592+ fn transaction_header ( & self , tracker : & H256 ) -> Option < :: encoded:: Header > {
593+ self . transaction_addresses ( tracker )
594594 . and_then ( |addr| {
595595 addr. into_iter ( )
596596 . find ( |addr| {
@@ -848,12 +848,12 @@ impl ChainTimeInfo for Client {
848848 self . chain_info ( ) . best_block_timestamp
849849 }
850850
851- fn transaction_block_age ( & self , hash : & H256 ) -> Option < u64 > {
852- self . transaction_block_number ( hash ) . map ( |block_number| self . chain_info ( ) . best_block_number - block_number)
851+ fn transaction_block_age ( & self , tracker : & H256 ) -> Option < u64 > {
852+ self . transaction_block_number ( tracker ) . map ( |block_number| self . chain_info ( ) . best_block_number - block_number)
853853 }
854854
855- fn transaction_time_age ( & self , hash : & H256 ) -> Option < u64 > {
856- self . transaction_block_timestamp ( hash )
855+ fn transaction_time_age ( & self , tracker : & H256 ) -> Option < u64 > {
856+ self . transaction_block_timestamp ( tracker )
857857 . map ( |block_timestamp| self . chain_info ( ) . best_block_timestamp - block_timestamp)
858858 }
859859}
Original file line number Diff line number Diff line change @@ -84,14 +84,14 @@ pub trait TransactionInfo {
8484 /// Get the hash of block that contains the transaction, if any.
8585 fn transaction_block ( & self , id : & TransactionId ) -> Option < H256 > ;
8686
87- fn transaction_header ( & self , hash : & H256 ) -> Option < :: encoded:: Header > ;
87+ fn transaction_header ( & self , tracker : & H256 ) -> Option < :: encoded:: Header > ;
8888
89- fn transaction_block_number ( & self , hash : & H256 ) -> Option < BlockNumber > {
90- self . transaction_header ( hash ) . map ( |header| header. number ( ) )
89+ fn transaction_block_number ( & self , tracker : & H256 ) -> Option < BlockNumber > {
90+ self . transaction_header ( tracker ) . map ( |header| header. number ( ) )
9191 }
9292
93- fn transaction_block_timestamp ( & self , hash : & H256 ) -> Option < u64 > {
94- self . transaction_header ( hash ) . map ( |header| header. timestamp ( ) )
93+ fn transaction_block_timestamp ( & self , tracker : & H256 ) -> Option < u64 > {
94+ self . transaction_header ( tracker ) . map ( |header| header. timestamp ( ) )
9595 }
9696}
9797
Original file line number Diff line number Diff line change @@ -423,7 +423,7 @@ impl TransactionInfo for TestBlockChainClient {
423423 None // Simple default.
424424 }
425425
426- fn transaction_header ( & self , _hash : & H256 ) -> Option < :: encoded:: Header > {
426+ fn transaction_header ( & self , _tracker : & H256 ) -> Option < :: encoded:: Header > {
427427 None
428428 }
429429}
Original file line number Diff line number Diff line change @@ -370,10 +370,10 @@ pub trait ChainTimeInfo {
370370 fn best_block_timestamp ( & self ) -> u64 ;
371371
372372 /// Get the block height of the transaction.
373- fn transaction_block_age ( & self , hash : & H256 ) -> Option < u64 > ;
373+ fn transaction_block_age ( & self , tracker : & H256 ) -> Option < u64 > ;
374374
375375 /// Get the how many seconds elapsed since transaction is confirmed, according to block timestamp.
376- fn transaction_time_age ( & self , hash : & H256 ) -> Option < u64 > ;
376+ fn transaction_time_age ( & self , tracker : & H256 ) -> Option < u64 > ;
377377}
378378
379379#[ cfg( test) ]
You can’t perform that action at this time.
0 commit comments