Stop trying to publish a Batch if another node does

This commit is contained in:
Luke Parker
2023-08-26 21:36:13 -04:00
parent 9adefa4c2c
commit 22f3c9e58f
3 changed files with 28 additions and 7 deletions

View File

@@ -22,6 +22,14 @@ impl Serai {
self.storage(PALLET, "LatestNetworkBlock", Some(vec![scale_value(network)]), hash).await
}
pub async fn get_last_batch_for_network(
&self,
hash: [u8; 32],
network: NetworkId,
) -> Result<Option<u32>, SeraiError> {
self.storage(PALLET, "LastBatch", Some(vec![scale_value(network)]), hash).await
}
pub async fn get_batch_events(
&self,
block: [u8; 32],