mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-30 07:01:03 +00:00
Make transaction pool prune transactions only of canonical blocks (#6123)
* Make tx pool aware of retracted fork blocks * Make it compile * Update client/transaction-pool/src/lib.rs Co-authored-by: Nikolay Volf <nikvolf@gmail.com> * Fix doc test * Simplify the implementation * Send tree route as arc to prevent heavy clones * Switch to use `ExtrinsicHash` to make it more clear * Fix benchmark Co-authored-by: Nikolay Volf <nikvolf@gmail.com>
This commit is contained in:
@@ -98,7 +98,7 @@ pub async fn run_manual_seal<B, CB, E, C, A, SC, S, T>(
|
||||
inherent_data_providers: InherentDataProviders,
|
||||
)
|
||||
where
|
||||
A: txpool::ChainApi<Block=B, Hash=<B as BlockT>::Hash> + 'static,
|
||||
A: txpool::ChainApi<Block=B> + 'static,
|
||||
B: BlockT + 'static,
|
||||
C: HeaderBackend<B> + Finalizer<B, CB> + 'static,
|
||||
CB: ClientBackend<B> + 'static,
|
||||
@@ -158,7 +158,7 @@ pub async fn run_instant_seal<B, CB, E, C, A, SC, T>(
|
||||
inherent_data_providers: InherentDataProviders,
|
||||
)
|
||||
where
|
||||
A: txpool::ChainApi<Block=B, Hash=<B as BlockT>::Hash> + 'static,
|
||||
A: txpool::ChainApi<Block=B> + 'static,
|
||||
B: BlockT + 'static,
|
||||
C: HeaderBackend<B> + Finalizer<B, CB> + 'static,
|
||||
CB: ClientBackend<B> + 'static,
|
||||
@@ -417,7 +417,7 @@ mod tests {
|
||||
id: BlockId::Number(1),
|
||||
header: client.header(&BlockId::Number(1)).expect("db error").expect("imported above"),
|
||||
is_new_best: true,
|
||||
retracted: vec![],
|
||||
tree_route: None,
|
||||
}).await;
|
||||
|
||||
let (tx1, rx1) = futures::channel::oneshot::channel();
|
||||
|
||||
Reference in New Issue
Block a user