Finalized block event triggers tx maintanance (#12305)
* finalized block event triggers tx maintanance * tx-pool: enactment helper introduced * tx-pool: ChainApi: added tree_route method * enactment logic implemented + tests Signed-off-by:Michal Kucharczyk <1728078+michalkucharczyk@users.noreply.github.com> * Some additional tests * minor improvements * trigger CI job * fix compilation errors ChainApi::tree_route return type changed to Result<Option<..>>, as some implementations (tests) are not required to provide this tree route. * formatting * trait removed * implementation slightly simplified (thanks to @koute ) * get rid of Arc<> in EnactmentState return value * minor improvement * Apply suggestions from code review Co-authored-by:
André Silva <123550+andresilva@users.noreply.github.com> * Apply suggestions from code review * comment updated + formatting * Apply suggestions from code review Co-authored-by:
André Silva <123550+andresilva@users.noreply.github.com> Co-authored-by:
Davide Galassi <davxy@datawok.net> * formatting * finalization notification bug fix + new test case + log::warn message when finalized block is being retracted by new event * added error message on tree_route failure * Apply suggestions from code review Co-authored-by:
Bastian Köcher <git@kchr.de> * use provided tree_route in Finalized event * Option removed from ChainApi::tree_route * doc added, test and logs improved * handle_enactment aligned with original implementation * use async-await * Apply suggestions from code review Co-authored-by:
André Silva <123550+andresilva@users.noreply.github.com> * Apply suggestions from code review Co-authored-by:
Bastian Köcher <git@kchr.de> * formatting + warn->debug * compilation error fix * enactment_state initializers added * enactment_state: Option removed * manual-seal: compilation & tests fix * manual-seal: tests fixed * tests cleanup * another compilation error fixed * TreeRoute::new added * get rid of pub hack * one more test added * formatting * TreeRoute::new doc added + formatting * Apply suggestions from code review Co-authored-by:
Davide Galassi <davxy@datawok.net> * (bool,Option) simplified to Option * log message improved * yet another review suggestions applied * get rid of hash in handle_enactment * Apply suggestions from code review Co-authored-by:
Bastian Köcher <git@kchr.de> * Update client/transaction-pool/src/lib.rs Co-authored-by:
Bastian Köcher <git@kchr.de> * minor corrections * EnactmentState moved to new file * File header corrected * error formatting aligned with codebase * Apply suggestions from code review Co-authored-by:
Bastian Köcher <git@kchr.de> * remove commented code * small nits Signed-off-by:
Michal Kucharczyk <1728078+michalkucharczyk@users.noreply.github.com> Co-authored-by:
André Silva <123550+andresilva@users.noreply.github.com> Co-authored-by:
Davide Galassi <davxy@datawok.net> Co-authored-by:
Bastian Köcher <git@kchr.de> Co-authored-by:
André Silva <andrerfosilva@gmail.com>
Showing
- substrate/Cargo.lock 2 additions, 0 deletionssubstrate/Cargo.lock
- substrate/client/consensus/manual-seal/src/lib.rs 19 additions, 9 deletionssubstrate/client/consensus/manual-seal/src/lib.rs
- substrate/client/transaction-pool/Cargo.toml 1 addition, 0 deletionssubstrate/client/transaction-pool/Cargo.toml
- substrate/client/transaction-pool/api/Cargo.toml 1 addition, 0 deletionssubstrate/client/transaction-pool/api/Cargo.toml
- substrate/client/transaction-pool/api/src/lib.rs 3 additions, 1 deletionsubstrate/client/transaction-pool/api/src/lib.rs
- substrate/client/transaction-pool/benches/basics.rs 8 additions, 0 deletionssubstrate/client/transaction-pool/benches/basics.rs
- substrate/client/transaction-pool/src/api.rs 24 additions, 6 deletionssubstrate/client/transaction-pool/src/api.rs
- substrate/client/transaction-pool/src/enactment_state.rs 579 additions, 0 deletionssubstrate/client/transaction-pool/src/enactment_state.rs
- substrate/client/transaction-pool/src/graph/pool.rs 8 additions, 0 deletionssubstrate/client/transaction-pool/src/graph/pool.rs
- substrate/client/transaction-pool/src/lib.rs 197 additions, 149 deletionssubstrate/client/transaction-pool/src/lib.rs
- substrate/client/transaction-pool/src/tests.rs 9 additions, 0 deletionssubstrate/client/transaction-pool/src/tests.rs
- substrate/client/transaction-pool/tests/pool.rs 599 additions, 25 deletionssubstrate/client/transaction-pool/tests/pool.rs
- substrate/primitives/blockchain/src/header_metadata.rs 7 additions, 0 deletionssubstrate/primitives/blockchain/src/header_metadata.rs
- substrate/test-utils/runtime/transaction-pool/src/lib.rs 9 additions, 1 deletionsubstrate/test-utils/runtime/transaction-pool/src/lib.rs
Please register or sign in to comment