Skip to content

Commit 0f10aef

Browse files
committed
refactor(encode block): simpler api
1 parent a2826c4 commit 0f10aef

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

rust/immutable-ledger/src/serialize.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,7 @@ pub fn encode_block(
152152
let mut block_data_cbor_encoding_check = minicbor::Decoder::new(&binding);
153153
let _ = block_data_cbor_encoding_check.bytes()?;
154154

155+
// cbor encode block hdr
155156
let encoded_block_hdr = encode_block_header(
156157
block_hdr.0,
157158
block_hdr.1,
@@ -170,12 +171,10 @@ pub fn encode_block(
170171

171172
// validator_signature MUST be a signature of the hashed block_header bytes
172173
// and the block_data bytes
173-
174174
let data_to_sign = [hashed_block_header, block_data.0.clone()].concat();
175175

176176
// if validator is only one id => validator_signature contains only 1 signature;
177177
// if validator is array => validator_signature contains an array with the same length;
178-
179178
let signatures: Vec<[u8; 64]> = validator_keys
180179
.0
181180
.iter()

0 commit comments

Comments
 (0)