@@ -9,7 +9,7 @@ pub mod selection;
99pub mod test_provider;
1010pub ( in crate :: message_pool) mod utils;
1111
12- use std:: { borrow:: BorrowMut , cmp:: Ordering , sync :: Arc } ;
12+ use std:: { borrow:: BorrowMut , cmp:: Ordering } ;
1313
1414use crate :: blocks:: Tipset ;
1515use crate :: libp2p:: { NetworkMessage , PUBSUB_MSG_STR , Topic } ;
@@ -213,7 +213,7 @@ where
213213pub async fn head_change < T > (
214214 api : & T ,
215215 bls_sig_cache : & SizeTrackingLruCache < CidWrapper , Signature > ,
216- repub_trigger : Arc < flume:: Sender < ( ) > > ,
216+ repub_trigger : flume:: Sender < ( ) > ,
217217 republished : & SyncRwLock < HashSet < Cid > > ,
218218 pending : & SyncRwLock < HashMap < Address , MsgSet > > ,
219219 cur_tipset : & SyncRwLock < Tipset > ,
@@ -356,8 +356,14 @@ pub mod tests {
356356
357357 let ( tx, _rx) = flume:: bounded ( 50 ) ;
358358 let mut services = JoinSet :: new ( ) ;
359- let mpool =
360- MessagePool :: new ( tma, tx, Default :: default ( ) , Arc :: default ( ) , & mut services) . unwrap ( ) ;
359+ let mpool = MessagePool :: new (
360+ tma,
361+ tx,
362+ Default :: default ( ) ,
363+ Default :: default ( ) ,
364+ & mut services,
365+ )
366+ . unwrap ( ) ;
361367 let mut smsg_vec = Vec :: new ( ) ;
362368 for i in 0 ..( mpool. api . max_actor_pending_messages ( ) + 1 ) {
363369 let msg = create_smsg ( & target, & sender, wallet. borrow_mut ( ) , i, 1000000 , 1 ) ;
@@ -436,8 +442,14 @@ pub mod tests {
436442
437443 let ( tx, _rx) = flume:: bounded ( 50 ) ;
438444 let mut services = JoinSet :: new ( ) ;
439- let mpool =
440- MessagePool :: new ( tma, tx, Default :: default ( ) , Arc :: default ( ) , & mut services) . unwrap ( ) ;
445+ let mpool = MessagePool :: new (
446+ tma,
447+ tx,
448+ Default :: default ( ) ,
449+ Default :: default ( ) ,
450+ & mut services,
451+ )
452+ . unwrap ( ) ;
441453 let mut smsg_vec = Vec :: new ( ) ;
442454 for i in 0 ..2 {
443455 let msg = create_smsg ( & target, & sender, wallet. borrow_mut ( ) , i, 1000000 , 1 ) ;
@@ -458,7 +470,7 @@ pub mod tests {
458470 let bls_sig_cache = mpool. bls_sig_cache . clone ( ) ;
459471 let pending = mpool. pending . clone ( ) ;
460472 let cur_tipset = mpool. cur_tipset . clone ( ) ;
461- let repub_trigger = Arc :: new ( mpool. repub_trigger . clone ( ) ) ;
473+ let repub_trigger = mpool. repub_trigger . clone ( ) ;
462474 let republished = mpool. republished . clone ( ) ;
463475 head_change (
464476 api. as_ref ( ) ,
@@ -497,8 +509,14 @@ pub mod tests {
497509 }
498510 let ( tx, _rx) = flume:: bounded ( 50 ) ;
499511 let mut services = JoinSet :: new ( ) ;
500- let mpool =
501- MessagePool :: new ( tma, tx, Default :: default ( ) , Arc :: default ( ) , & mut services) . unwrap ( ) ;
512+ let mpool = MessagePool :: new (
513+ tma,
514+ tx,
515+ Default :: default ( ) ,
516+ Default :: default ( ) ,
517+ & mut services,
518+ )
519+ . unwrap ( ) ;
502520
503521 {
504522 let mut api_temp = mpool. api . inner . lock ( ) ;
@@ -519,7 +537,7 @@ pub mod tests {
519537 let bls_sig_cache = mpool. bls_sig_cache . clone ( ) ;
520538 let pending = mpool. pending . clone ( ) ;
521539 let cur_tipset = mpool. cur_tipset . clone ( ) ;
522- let repub_trigger = Arc :: new ( mpool. repub_trigger . clone ( ) ) ;
540+ let repub_trigger = mpool. repub_trigger . clone ( ) ;
523541 let republished = mpool. republished . clone ( ) ;
524542 head_change (
525543 api. as_ref ( ) ,
@@ -590,8 +608,14 @@ pub mod tests {
590608 tma. set_state_sequence ( & sender, 0 ) ;
591609 let ( tx, _rx) = flume:: bounded ( 50 ) ;
592610 let mut services = JoinSet :: new ( ) ;
593- let mpool =
594- MessagePool :: new ( tma, tx, Default :: default ( ) , Arc :: default ( ) , & mut services) . unwrap ( ) ;
611+ let mpool = MessagePool :: new (
612+ tma,
613+ tx,
614+ Default :: default ( ) ,
615+ Default :: default ( ) ,
616+ & mut services,
617+ )
618+ . unwrap ( ) ;
595619
596620 let mut smsg_vec = Vec :: new ( ) ;
597621 for i in 0 ..3 {
0 commit comments