Skip to content

Commit

Permalink
fix: precompile issue for risv32 bytes len array
Browse files Browse the repository at this point in the history
  • Loading branch information
ZhAnGeek committed Nov 8, 2024
1 parent 96c8eee commit 1c82521
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion crates/precompile/src/cometbft.rs
Original file line number Diff line number Diff line change
Expand Up @@ -408,7 +408,7 @@ fn encode_light_block_validation_result(
let mut output =
vec![0; (VALIDATE_RESULT_METADATA_LENGTH + consensus_state_bytes.len() as u64) as usize];
output[0] = if validator_set_changed { 1 } else { 0 };
output[24..32].copy_from_slice(consensus_state_bytes.len().to_be_bytes().as_ref());
output[24..32].copy_from_slice((consensus_state_bytes.len() as u64).to_be_bytes().as_ref());
output[32..].copy_from_slice(consensus_state_bytes.as_ref());
Bytes::from(output)
}
Expand Down

0 comments on commit 1c82521

Please sign in to comment.