Skip to content

Commit 4c6c60b

Browse files
committed
fix StateData commitment id
1 parent 3069cbf commit 4c6c60b

File tree

2 files changed

+14
-13
lines changed

2 files changed

+14
-13
lines changed

Cargo.lock

+12-12
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/state.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323

2424
use aluvm::{fe128, LibSite};
2525
use amplify::confinement::SmallBlob;
26+
use amplify::{ByteArray, Bytes32};
2627
use commit_verify::{CommitEncode, CommitEngine, MerkleHash, StrictHash};
2728

2829
use crate::LIB_NAME_ULTRASONIC;
@@ -126,7 +127,7 @@ impl CommitEncode for StateData {
126127
fn commit_encode(&self, e: &mut CommitEngine) {
127128
e.commit_to_serialized(&self.value);
128129
match &self.raw {
129-
None => e.commit_to_serialized(&[0; 32]),
130+
None => e.commit_to_serialized(&Bytes32::from([0; 32])),
130131
Some(raw) => e.commit_to_hash(raw),
131132
}
132133
}

0 commit comments

Comments
 (0)