mirror of
https://github.com/0glabs/0g-storage-node.git
synced 2025-11-03 08:07:27 +00:00
fix tests
This commit is contained in:
parent
7a4e2fe008
commit
366a2a82f6
@ -42,7 +42,7 @@ impl OptionalHash {
|
||||
}
|
||||
|
||||
pub fn to_h256_or_zero(&self) -> H256 {
|
||||
self.0.unwrap_or_else(H256::zero)
|
||||
self.0.unwrap()
|
||||
}
|
||||
}
|
||||
|
||||
@ -95,7 +95,7 @@ impl Encode for OptionalHash {
|
||||
|
||||
fn ssz_append(&self, buf: &mut Vec<u8>) {
|
||||
// Use H256::zero() for None, actual hash for Some
|
||||
let hash = self.0.unwrap_or_else(H256::zero);
|
||||
let hash = self.0.unwrap();
|
||||
hash.ssz_append(buf);
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user