File tree Expand file tree Collapse file tree 5 files changed +15
-3
lines changed Expand file tree Collapse file tree 5 files changed +15
-3
lines changed Original file line number Diff line number Diff line change @@ -282,6 +282,10 @@ impl sc_transaction_pool_api::TransactionPool for Transactions {
282282 Default :: default ( )
283283 }
284284
285+ fn futures ( & self ) -> Vec < Self :: InPoolTransaction > {
286+ unimplemented ! ( )
287+ }
288+
285289 fn status ( & self ) -> PoolStatus {
286290 unimplemented ! ( )
287291 }
Original file line number Diff line number Diff line change @@ -247,6 +247,9 @@ pub trait TransactionPool: Send + Sync {
247247 fn remove_invalid ( & self , hashes : & [ TxHash < Self > ] ) -> Vec < Arc < Self :: InPoolTransaction > > ;
248248
249249 // *** logging
250+ /// Get futures transaction list.
251+ fn futures ( & self ) -> Vec < Self :: InPoolTransaction > ;
252+
250253 /// Returns pool status.
251254 fn status ( & self ) -> PoolStatus ;
252255
Original file line number Diff line number Diff line change @@ -84,8 +84,7 @@ pub struct PruneStatus<Hash, Ex> {
8484}
8585
8686/// Immutable transaction
87- #[ cfg_attr( test, derive( Clone ) ) ]
88- #[ derive( PartialEq , Eq ) ]
87+ #[ derive( PartialEq , Eq , Clone ) ]
8988pub struct Transaction < Hash , Extrinsic > {
9089 /// Raw extrinsic representing that transaction.
9190 pub data : Extrinsic ,
Original file line number Diff line number Diff line change @@ -106,7 +106,7 @@ pub struct ValidatedPool<B: ChainApi> {
106106 is_validator : IsValidator ,
107107 options : Options ,
108108 listener : RwLock < Listener < ExtrinsicHash < B > , B > > ,
109- pool : RwLock < base:: BasePool < ExtrinsicHash < B > , ExtrinsicFor < B > > > ,
109+ pub ( crate ) pool : RwLock < base:: BasePool < ExtrinsicHash < B > , ExtrinsicFor < B > > > ,
110110 import_notification_sinks : Mutex < Vec < Sender < ExtrinsicHash < B > > > > ,
111111 rotator : PoolRotator < ExtrinsicHash < B > > ,
112112}
Original file line number Diff line number Diff line change @@ -358,6 +358,12 @@ where
358358 fn ready ( & self ) -> ReadyIteratorFor < PoolApi > {
359359 Box :: new ( self . pool . validated_pool ( ) . ready ( ) )
360360 }
361+
362+ fn futures ( & self ) -> Vec < Self :: InPoolTransaction > {
363+ let pool = self . pool . validated_pool ( ) . pool . read ( ) ;
364+
365+ pool. futures ( ) . cloned ( ) . collect :: < Vec < _ > > ( )
366+ }
361367}
362368
363369impl < Block , Client > FullPool < Block , Client >
You can’t perform that action at this time.
0 commit comments