mirror of
https://github.com/serai-dex/serai.git
synced 2025-12-08 12:19:24 +00:00
Call fatal_slash where easy and appropriate
This commit is contained in:
@@ -22,7 +22,7 @@ use serai_db::DbTxn;
|
||||
|
||||
use crate::{
|
||||
Db,
|
||||
tributary::handle::handle_application_tx,
|
||||
tributary::handle::{fatal_slash, handle_application_tx},
|
||||
processors::Processors,
|
||||
tributary::{TributaryDb, TributarySpec, Transaction},
|
||||
P2p,
|
||||
@@ -84,9 +84,12 @@ async fn handle_block<
|
||||
|
||||
// Since anything with evidence is fundamentally faulty behavior, not just temporal errors,
|
||||
// mark the node as fatally slashed
|
||||
TributaryDb::<D>::set_fatally_slashed(&mut txn, genesis, msgs.0.msg.sender);
|
||||
|
||||
// TODO2: disconnect the node from network/ban from further participation in Tributary
|
||||
fatal_slash::<D>(
|
||||
&mut txn,
|
||||
genesis,
|
||||
msgs.0.msg.sender,
|
||||
&format!("invalid tendermint messages: {:?}", msgs),
|
||||
);
|
||||
}
|
||||
TributaryTransaction::Application(tx) => {
|
||||
handle_application_tx::<D, _, _, _, _, _>(
|
||||
|
||||
Reference in New Issue
Block a user