make the transacation logs independent from the block finalization or production, thanks to @doctor_k

Signed-off-by: Uncle Stretch <uncle.stretch@ghostchain.io>
This commit is contained in:
Uncle Stretch 2025-01-20 13:50:01 +03:00
parent 3662f9c666
commit ddc8eb062a
Signed by: str3tch
GPG Key ID: 84F3190747EE79AA
3 changed files with 5 additions and 0 deletions

View File

@ -19,6 +19,7 @@ pub enum Action {
ClearScreen,
Error(String),
Help,
CheckPendingTransactions,
SetMode(crate::app::Mode),
SetActiveScreen(crate::app::Mode),

View File

@ -162,6 +162,7 @@ impl App {
fn trigger_node_fast_events(&mut self) -> Result<()> {
self.network_tx.send(Action::GetPendingExtrinsics)?;
self.network_tx.send(Action::GetConnectedPeers)?;
self.network_tx.send(Action::CheckPendingTransactions)?;
Ok(())
}

View File

@ -80,6 +80,9 @@ impl Network {
},
Action::NewFinalizedHash(hash) => {
self.finalized_hash = Some(hash);
Ok(())
},
Action::CheckPendingTransactions => {
let length = self.transactions_to_watch.len();
for i in (0..length).rev() {
let pending_tx = &mut self.transactions_to_watch[i];