Skip to content
This repository has been archived by the owner on Dec 17, 2024. It is now read-only.

Commit

Permalink
Don't recovery non-executed txs on startup (#197)
Browse files Browse the repository at this point in the history
It has turned out in practice that nodes are unable to re-execute old
non-executed transactions on startup. It often happens that nodes are
running long time without restart and when they do, they start to
re-execute transactions from several days / weeks behind, which doesn't
make any sense.

Therefore drop the pickup of non-executed transactions on startup and
continue from the latest "HEAD".
  • Loading branch information
tuommaki authored Jun 10, 2024
1 parent a9a11f7 commit 82bff11
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions crates/node/src/mempool/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -140,8 +140,7 @@ pub struct Mempool {

impl Mempool {
pub async fn new(storage: Arc<dyn MempoolStorage>) -> Result<Self> {
let mut deque = VecDeque::new();
storage.fill_deque(&mut deque).await?;
let deque = VecDeque::new();
Ok(Self { storage, deque })
}

Expand Down

0 comments on commit 82bff11

Please sign in to comment.