Skip to content

Commit 8d391d9

Browse files
committed
Fix encoding of genesis supply into genesis block
Use the mirror function of `u64::from_be_bytes`, which is used when reading it.
1 parent aa4382b commit 8d391d9

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

genesis-builder/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -403,7 +403,7 @@ impl GenesisBuilder {
403403
parent_election_hash,
404404
interlink: Some(vec![]),
405405
seed,
406-
extra_data: supply.serialize_to_vec(),
406+
extra_data: u64::from(supply).to_be_bytes().to_vec(),
407407
state_root,
408408
body_root,
409409
diff_root: TreeProof::empty().root_hash(),

0 commit comments

Comments
 (0)