@@ -110,19 +110,19 @@ impl TransactionPoolOptions {
110110/// This trait defines the requirements for a full client transaction pool, ensuring
111111/// that it can handle transactions submission and maintenance.
112112pub trait FullClientTransactionPool < Block , Client > :
113- MaintainedTransactionPool <
114- Block = Block ,
115- Hash = ExtrinsicHash < FullChainApi < Client , Block > > ,
116- InPoolTransaction = Transaction <
117- ExtrinsicHash < FullChainApi < Client , Block > > ,
118- ExtrinsicFor < FullChainApi < Client , Block > > ,
119- > ,
120- Error = <FullChainApi < Client , Block > as ChainApi >:: Error ,
121- > + LocalTransactionPool <
122- Block = Block ,
123- Hash = ExtrinsicHash < FullChainApi < Client , Block > > ,
124- Error = <FullChainApi < Client , Block > as ChainApi >:: Error ,
125- >
113+ MaintainedTransactionPool <
114+ Block = Block ,
115+ Hash = ExtrinsicHash < FullChainApi < Client , Block > > ,
116+ InPoolTransaction = Transaction <
117+ ExtrinsicHash < FullChainApi < Client , Block > > ,
118+ ExtrinsicFor < FullChainApi < Client , Block > > ,
119+ > ,
120+ Error = <FullChainApi < Client , Block > as ChainApi >:: Error ,
121+ > + LocalTransactionPool <
122+ Block = Block ,
123+ Hash = ExtrinsicHash < FullChainApi < Client , Block > > ,
124+ Error = <FullChainApi < Client , Block > as ChainApi >:: Error ,
125+ > + std :: any :: Any
126126where
127127 Block : BlockT ,
128128 Client : sp_api:: ProvideRuntimeApi < Block >
@@ -133,6 +133,9 @@ where
133133 + ' static ,
134134 Client :: Api : sp_transaction_pool:: runtime_api:: TaggedTransactionQueue < Block > ,
135135{
136+ /// Return the inner pool as a `&dyn Any`, can be used to downcast to the concrete pool
137+ /// type and use methods that only exist in that pool implementation.
138+ fn as_any ( & self ) -> & dyn std:: any:: Any ;
136139}
137140
138141impl < Block , Client , P > FullClientTransactionPool < Block , Client > for P
@@ -157,8 +160,11 @@ where
157160 Block = Block ,
158161 Hash = ExtrinsicHash < FullChainApi < Client , Block > > ,
159162 Error = <FullChainApi < Client , Block > as ChainApi >:: Error ,
160- > ,
163+ > + ' static ,
161164{
165+ fn as_any ( & self ) -> & dyn std:: any:: Any {
166+ self as & dyn std:: any:: Any
167+ }
162168}
163169
164170/// The public type alias for the actual type providing the implementation of
0 commit comments