fix(primitives): Fix round-trip decoding of genesis block (#58)
This commit is contained in:
parent
8ccc9d48f7
commit
990c543244
1 changed files with 3 additions and 1 deletions
|
|
@ -894,7 +894,7 @@ pub struct EbBlock {
|
||||||
pub body: MaybeIndefArray<StakeholderId>,
|
pub body: MaybeIndefArray<StakeholderId>,
|
||||||
|
|
||||||
#[n(2)]
|
#[n(2)]
|
||||||
pub extra: Option<Attributes>,
|
pub extra: MaybeIndefArray<Attributes>,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[allow(clippy::large_enum_variant)]
|
#[allow(clippy::large_enum_variant)]
|
||||||
|
|
@ -954,9 +954,11 @@ mod tests {
|
||||||
#[test]
|
#[test]
|
||||||
fn block_isomorphic_decoding_encoding() {
|
fn block_isomorphic_decoding_encoding() {
|
||||||
let test_blocks = vec![
|
let test_blocks = vec![
|
||||||
|
include_str!("test_data/genesis.block"),
|
||||||
include_str!("test_data/test1.block"),
|
include_str!("test_data/test1.block"),
|
||||||
include_str!("test_data/test2.block"),
|
include_str!("test_data/test2.block"),
|
||||||
include_str!("test_data/test3.block"),
|
include_str!("test_data/test3.block"),
|
||||||
|
include_str!("test_data/test4.block"),
|
||||||
];
|
];
|
||||||
|
|
||||||
for (idx, block_str) in test_blocks.iter().enumerate() {
|
for (idx, block_str) in test_blocks.iter().enumerate() {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue