mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-30 02:21:04 +00:00
Transactionpool: Make ready_at return earlier (#8995)
`ready_at` returns when we have processed the requested block. However, on startup we already have processed the best block and there are no transactions in the pool on startup anyway. So, we can set `updated_at` to the best block on startup. Besides that `ready_at` now returns early when there are no ready nor any future transactions in the pool.
This commit is contained in:
@@ -296,7 +296,13 @@ mod tests {
|
||||
let client = Arc::new(client);
|
||||
let spawner = sp_core::testing::TaskExecutor::new();
|
||||
let pool = Arc::new(BasicPool::with_revalidation_type(
|
||||
Options::default(), true.into(), api(), None, RevalidationType::Full, spawner.clone(),
|
||||
Options::default(),
|
||||
true.into(),
|
||||
api(),
|
||||
None,
|
||||
RevalidationType::Full,
|
||||
spawner.clone(),
|
||||
0,
|
||||
));
|
||||
let env = ProposerFactory::new(
|
||||
spawner.clone(),
|
||||
@@ -373,6 +379,7 @@ mod tests {
|
||||
None,
|
||||
RevalidationType::Full,
|
||||
spawner.clone(),
|
||||
0,
|
||||
));
|
||||
let env = ProposerFactory::new(
|
||||
spawner.clone(),
|
||||
@@ -453,6 +460,7 @@ mod tests {
|
||||
None,
|
||||
RevalidationType::Full,
|
||||
spawner.clone(),
|
||||
0,
|
||||
));
|
||||
let env = ProposerFactory::new(
|
||||
spawner.clone(),
|
||||
|
||||
Reference in New Issue
Block a user