@@ -37,7 +37,6 @@ use crate::MemPoolMinFees;
3737use cdb:: { new_journaldb, Algorithm , AsHashDB } ;
3838use cio:: IoChannel ;
3939use ckey:: { Address , NetworkId , PlatformAddress } ;
40- use cnetwork:: NodeId ;
4140use cstate:: { ActionHandler , FindActionHandler , StateDB , StateResult , TopLevelState , TopStateView } ;
4241use ctimer:: { TimeoutHandler , TimerApi , TimerScheduleError , TimerToken } ;
4342use ctypes:: header:: Header ;
@@ -138,12 +137,6 @@ impl Client {
138137 self . notify . write ( ) . push ( target) ;
139138 }
140139
141- pub fn transactions_received ( & self , hashes : & [ TxHash ] , peer_id : NodeId ) {
142- self . notify ( |notify| {
143- notify. transactions_received ( hashes. to_vec ( ) , peer_id) ;
144- } ) ;
145- }
146-
147140 pub fn new_blocks ( & self , imported : & [ BlockHash ] , invalid : & [ BlockHash ] , enacted : & [ BlockHash ] ) {
148141 self . notify ( |notify| notify. new_blocks ( imported. to_vec ( ) , invalid. to_vec ( ) , enacted. to_vec ( ) ) ) ;
149142 }
@@ -202,13 +195,11 @@ impl Client {
202195 }
203196
204197 /// Import transactions from the IO queue
205- pub fn import_queued_transactions ( & self , transactions : & [ Bytes ] , peer_id : NodeId ) -> usize {
198+ pub fn import_queued_transactions ( & self , transactions : & [ Bytes ] ) -> usize {
206199 ctrace ! ( EXTERNAL_TX , "Importing queued" ) ;
207200 self . queue_transactions . fetch_sub ( transactions. len ( ) , AtomicOrdering :: SeqCst ) ;
208201 let transactions: Vec < UnverifiedTransaction > =
209202 transactions. iter ( ) . filter_map ( |bytes| Rlp :: new ( bytes) . as_val ( ) . ok ( ) ) . collect ( ) ;
210- let hashes: Vec < _ > = transactions. iter ( ) . map ( UnverifiedTransaction :: hash) . collect ( ) ;
211- self . transactions_received ( & hashes, peer_id) ;
212203 let results = self . importer . miner . import_external_transactions ( self , transactions) ;
213204 results. len ( )
214205 }
@@ -535,14 +526,14 @@ impl BlockChainClient for Client {
535526 Ok ( ( ) )
536527 }
537528
538- fn queue_transactions ( & self , transactions : Vec < Bytes > , peer_id : NodeId ) {
529+ fn queue_transactions ( & self , transactions : Vec < Bytes > ) {
539530 let queue_size = self . queue_transactions . load ( AtomicOrdering :: Relaxed ) ;
540531 ctrace ! ( EXTERNAL_TX , "Queue size: {}" , queue_size) ;
541532 if queue_size > MAX_MEM_POOL_SIZE {
542533 cwarn ! ( EXTERNAL_TX , "Ignoring {} transactions: queue is full" , transactions. len( ) ) ;
543534 } else {
544535 let len = transactions. len ( ) ;
545- match self . io_channel . lock ( ) . send ( ClientIoMessage :: NewTransactions ( transactions, peer_id ) ) {
536+ match self . io_channel . lock ( ) . send ( ClientIoMessage :: NewTransactions ( transactions) ) {
546537 Ok ( _) => {
547538 self . queue_transactions . fetch_add ( len, AtomicOrdering :: SeqCst ) ;
548539 }
0 commit comments