mirror of
https://github.com/serai-dex/serai.git
synced 2025-12-08 12:19:24 +00:00
Restore block_hash to Batch
It's not only helpful (to easily check where Serai's view of the external network is) but it's necessary in case of a non-trivial chain fork to determine which blockchain Serai considers canonical.
This commit is contained in:
@@ -20,6 +20,7 @@ pub enum Event {
|
||||
network: NetworkId,
|
||||
publishing_session: Session,
|
||||
id: u32,
|
||||
external_network_block_hash: [u8; 32],
|
||||
in_instructions_hash: [u8; 32],
|
||||
in_instruction_results: bitvec::vec::BitVec<u8, bitvec::order::Lsb0>,
|
||||
},
|
||||
|
||||
@@ -63,6 +63,7 @@ pub mod pallet {
|
||||
Batch {
|
||||
network: NetworkId,
|
||||
publishing_session: Session,
|
||||
external_network_block_hash: [u8; 32],
|
||||
id: u32,
|
||||
in_instructions_hash: [u8; 32],
|
||||
in_instruction_results: BitVec<u8, Lsb0>,
|
||||
@@ -356,6 +357,7 @@ pub mod pallet {
|
||||
network: batch.network,
|
||||
publishing_session: if valid_by_prior { prior_session } else { current_session },
|
||||
id: batch.id,
|
||||
external_network_block_hash: batch.external_network_block_hash,
|
||||
in_instructions_hash,
|
||||
in_instruction_results,
|
||||
});
|
||||
|
||||
@@ -106,6 +106,7 @@ pub struct InInstructionWithBalance {
|
||||
pub struct Batch {
|
||||
pub network: NetworkId,
|
||||
pub id: u32,
|
||||
pub external_network_block_hash: [u8; 32],
|
||||
pub instructions: Vec<InInstructionWithBalance>,
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user