feat: add timestamp to pool update (#3833)

This commit is contained in:
Panagiotis Ganelis
2023-07-18 18:02:13 +03:00
committed by GitHub
parent e66464b14f
commit 9313eda6cc
3 changed files with 5 additions and 0 deletions

View File

@@ -266,6 +266,7 @@ pub async fn maintain_transaction_pool<Client, P, St, Tasks>(
changed_accounts,
// all transactions mined in the new chain need to be removed from the pool
mined_transactions: new_mined_transactions.into_iter().collect(),
timestamp: new_tip.timestamp,
};
pool.on_canonical_state_change(update);
@@ -331,6 +332,7 @@ pub async fn maintain_transaction_pool<Client, P, St, Tasks>(
pending_block_base_fee,
changed_accounts,
mined_transactions,
timestamp: tip.timestamp,
};
pool.on_canonical_state_change(update);
}

View File

@@ -257,6 +257,7 @@ where
pending_block_base_fee,
changed_accounts,
mined_transactions,
timestamp: _,
} = update;
let changed_senders = self.changed_senders(changed_accounts.into_iter());
let block_info = BlockInfo {

View File

@@ -402,6 +402,8 @@ pub struct CanonicalStateUpdate {
pub changed_accounts: Vec<ChangedAccount>,
/// All mined transactions in the block range.
pub mined_transactions: Vec<H256>,
/// Timestamp of the latest chain update
pub timestamp: u64,
}
impl fmt::Display for CanonicalStateUpdate {