From 0d7466390cf49956d176486cae08576299f3e695 Mon Sep 17 00:00:00 2001 From: xdustinface Date: Fri, 26 Dec 2025 09:41:56 +0100 Subject: [PATCH] fix: Use `from_byte_array` for dummy block hash in tests Using `BlockHash::hash(&[0])` causes heap buffer overflow in sanitizer step in the CI overhaul #253 because it tries to X11 hash a 1 byte input. --- dash/src/bip152.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dash/src/bip152.rs b/dash/src/bip152.rs index a88343c6..62c35c1f 100644 --- a/dash/src/bip152.rs +++ b/dash/src/bip152.rs @@ -412,7 +412,7 @@ mod test { Block { header: block::Header { version: block::Version::ONE, - prev_blockhash: BlockHash::hash(&[0]), + prev_blockhash: BlockHash::from_byte_array([0; 32]), merkle_root: TxMerkleNode::hash(&[1]), time: 2, bits: CompactTarget::from_consensus(3),