Skip to content

Commit

Permalink
rusk: change EST to not discard not ready moonlight txs
Browse files Browse the repository at this point in the history
  • Loading branch information
herr-seppia committed Sep 3, 2024
1 parent 40d5aab commit 8156c90
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions rusk/src/lib/node/rusk.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ use std::sync::{mpsc, Arc, LazyLock};
use std::time::{Duration, Instant};
use std::{fs, io};

use execution_core::transfer::PANIC_NONCE_NOT_READY;
use parking_lot::RwLock;
use sha3::{Digest, Sha3_256};
use tokio::task;
Expand Down Expand Up @@ -180,6 +181,16 @@ impl Rusk {
err,
});
}
Err(PiecrustError::Panic(val))
if val == PANIC_NONCE_NOT_READY =>
{
// If the transaction panic due to a not yet valid nonce,
// we should not discard the transactions since it can be
// included in future.

// TODO: Try to process the transaction as soon as the
// nonce is unlocked
}
Err(e) => {
info!("discard tx {tx_id} due to {e:?}");
// An unspendable transaction should be discarded
Expand Down

0 comments on commit 8156c90

Please sign in to comment.