mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-12 12:21:32 +00:00
transaction-pool: drop unpropagable txs if local node cant author blocks (#8048)
* transaction-pool: drop unpropagable txs if local node cant author blocks * fix test compilation * transaction-pool: remove unnecessary static bound on CanAuthor Co-authored-by: Tomasz Drwięga <tomusdrw@users.noreply.github.com> * rpc-api: add translation for PoolError::Unactionable * transaction-pool: add test for rejecting unactionable transactions * basic-authorship: fix doc test * transaction-pool: fix benchmark compilation * transaction-pool: rename CanAuthor to IsValidator * transaction-pool: nit in error message Co-authored-by: Tomasz Drwięga <tomusdrw@users.noreply.github.com>
This commit is contained in:
@@ -37,7 +37,7 @@ use sc_block_builder::BlockBuilderProvider;
|
||||
use sp_consensus::BlockOrigin;
|
||||
|
||||
fn pool() -> Pool<TestApi> {
|
||||
Pool::new(Default::default(), TestApi::with_alice_nonce(209).into())
|
||||
Pool::new(Default::default(), true.into(), TestApi::with_alice_nonce(209).into())
|
||||
}
|
||||
|
||||
fn maintained_pool() -> (
|
||||
@@ -161,7 +161,7 @@ fn should_correctly_prune_transactions_providing_more_than_one_tag() {
|
||||
api.set_valid_modifier(Box::new(|v: &mut ValidTransaction| {
|
||||
v.provides.push(vec![155]);
|
||||
}));
|
||||
let pool = Pool::new(Default::default(), api.clone());
|
||||
let pool = Pool::new(Default::default(), true.into(), api.clone());
|
||||
let xt = uxt(Alice, 209);
|
||||
block_on(pool.submit_one(&BlockId::number(0), SOURCE, xt.clone())).expect("1. Imported");
|
||||
assert_eq!(pool.validated_pool().status().ready, 1);
|
||||
|
||||
Reference in New Issue
Block a user