txpool: don't maintain the pool during major sync (#13004)
* txpool: don't maintain the pool during major sync Fix shall prevent from wasting the CPU during the major sync. No actions are actually required in transaction pool during the major sync. Fixes: #12903 * passing sync_oracle to maintain method * fixed: builder, txpool tests * do not maintain tx-pool if node gone out of sync * EnactmentAction: all logic moved to EnactmentState Tests to be done. * maintain guard logic moved directly to MaintainedTransactionPool * minor fixes * EnactmentAction: all logic moved to EnactmentState (again) * SyncOracle fixes here and there * Update client/transaction-pool/src/enactment_state.rs Co-authored-by:Bastian Köcher <git@kchr.de> * Update client/transaction-pool/src/enactment_state.rs Co-authored-by:
Bastian Köcher <git@kchr.de> * sync_oracle removed * spelling + fmt + doc * Review suggestions applied * log::info -> debug * Update client/transaction-pool/src/enactment_state.rs Co-authored-by:
Bastian Köcher <git@kchr.de> * ".git/.scripts/commands/fmt/fmt.sh" Co-authored-by: parity-processbot <> Co-authored-by:
Bastian Köcher <git@kchr.de>
Showing
- substrate/Cargo.lock 1 addition, 0 deletionssubstrate/Cargo.lock
- substrate/client/transaction-pool/Cargo.toml 1 addition, 0 deletionssubstrate/client/transaction-pool/Cargo.toml
- substrate/client/transaction-pool/src/enactment_state.rs 133 additions, 52 deletionssubstrate/client/transaction-pool/src/enactment_state.rs
- substrate/client/transaction-pool/src/lib.rs 10 additions, 4 deletionssubstrate/client/transaction-pool/src/lib.rs
Please register or sign in to comment