Add test for the integrity of headers

This commit is contained in:
Luke Parker
2025-11-14 12:04:21 -05:00
parent 09113201e7
commit 46b1f1b7ec
9 changed files with 165 additions and 32 deletions

View File

@@ -34,7 +34,7 @@ sp_api::decl_runtime_apis! {
fn build(genesis: GenesisConfig);
}
pub trait SeraiApi {
fn events() -> Vec<Vec<u8>>;
fn events() -> Vec<Vec<Vec<u8>>>;
fn validators(network: NetworkId) -> Vec<Public>;
fn current_session(network: NetworkId) -> Option<Session>;
fn current_stake(network: NetworkId) -> Option<Amount>;
@@ -179,7 +179,7 @@ mod apis {
}
impl crate::SeraiApi<Block> for Runtime {
fn events() -> Vec<Vec<u8>> {
fn events() -> Vec<Vec<Vec<u8>>> {
unimplemented!("runtime is only implemented when WASM")
}
fn validators(

View File

@@ -550,7 +550,7 @@ sp_api::impl_runtime_apis! {
}
impl crate::SeraiApi<Block> for Runtime {
fn events() -> Vec<Vec<u8>> {
fn events() -> Vec<Vec<Vec<u8>>> {
Core::events()
}
fn validators(network: NetworkId) -> Vec<serai_abi::primitives::crypto::Public> {