mirror of
https://github.com/serai-dex/serai.git
synced 2025-02-02 03:06:31 +00:00
Ignore NewSet events for Serai in the coordinator
The coordinator has nothing to do in this case.
This commit is contained in:
parent
7ac0de3a8d
commit
9ab43407e1
1 changed files with 10 additions and 14 deletions
|
@ -249,22 +249,18 @@ async fn handle_block<
|
|||
// Additionally, if the Serai connection also fails 1/100 times, this means a block with 1000
|
||||
// events will successfully be incrementally handled (though the Serai connection should be
|
||||
// stable)
|
||||
let ValidatorSetsEvent::NewSet { set } = new_set else {
|
||||
panic!("NewSet event wasn't NewSet: {new_set:?}");
|
||||
};
|
||||
|
||||
if set.network == NetworkId::Serai {
|
||||
continue;
|
||||
}
|
||||
|
||||
if !SubstrateDb::<D>::handled_event(&db.0, hash, event_id) {
|
||||
if let ValidatorSetsEvent::NewSet { set } = new_set {
|
||||
log::info!("found fresh new set event {:?}", new_set);
|
||||
handle_new_set(
|
||||
&mut db.0,
|
||||
key,
|
||||
create_new_tributary.clone(),
|
||||
processors,
|
||||
serai,
|
||||
&block,
|
||||
set,
|
||||
)
|
||||
log::info!("found fresh new set event {:?}", new_set);
|
||||
handle_new_set(&mut db.0, key, create_new_tributary.clone(), processors, serai, &block, set)
|
||||
.await?;
|
||||
} else {
|
||||
panic!("NewSet event wasn't NewSet: {new_set:?}");
|
||||
}
|
||||
let mut txn = db.0.txn();
|
||||
SubstrateDb::<D>::handle_event(&mut txn, hash, event_id);
|
||||
txn.commit();
|
||||
|
|
Loading…
Reference in a new issue