Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Commit

Permalink
txpool: don't maintain the pool during major sync (#13004)
Browse files Browse the repository at this point in the history
* 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 <[email protected]>

* Update client/transaction-pool/src/enactment_state.rs

Co-authored-by: Bastian Köcher <[email protected]>

* 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 <[email protected]>

* ".git/.scripts/commands/fmt/fmt.sh"

Co-authored-by: parity-processbot <>
Co-authored-by: Bastian Köcher <[email protected]>
  • Loading branch information
2 people authored and Ross Bulat committed Feb 3, 2023
1 parent 1fae5b8 commit 0b6c946
Show file tree
Hide file tree
Showing 4 changed files with 145 additions and 56 deletions.
1 change: 1 addition & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions client/transaction-pool/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ futures = "0.3.21"
futures-timer = "3.0.2"
linked-hash-map = "0.5.4"
log = "0.4.17"
num-traits = "0.2.8"
parking_lot = "0.12.1"
serde = { version = "1.0.136", features = ["derive"] }
thiserror = "1.0.30"
Expand Down
Loading

0 comments on commit 0b6c946

Please sign in to comment.