Rename Hash::zero() to Hash::default() (#858)
It is more idiomatic, also `zero` is misleading in context of `+` operator.
This commit is contained in:
committed by
Ignotus Peverell
parent
388beafb65
commit
bb134758e7
@@ -107,7 +107,7 @@ impl DummyChainImpl {
|
||||
impl BlockChain for DummyChainImpl {
|
||||
fn is_unspent(&self, output_ref: &OutputIdentifier) -> Result<hash::Hash, PoolError> {
|
||||
match self.output.read().unwrap().get_output(&output_ref.commit) {
|
||||
Some(_) => Ok(hash::Hash::zero()),
|
||||
Some(_) => Ok(hash::Hash::default()),
|
||||
None => Err(PoolError::GenericPoolError),
|
||||
}
|
||||
}
|
||||
|
||||
+3
-3
@@ -1654,9 +1654,9 @@ mod tests {
|
||||
let mut tx_elements = Vec::new();
|
||||
|
||||
let merkle_proof = MerkleProof {
|
||||
node: Hash::zero(),
|
||||
root: Hash::zero(),
|
||||
peaks: vec![Hash::zero()],
|
||||
node: Hash::default(),
|
||||
root: Hash::default(),
|
||||
peaks: vec![Hash::default()],
|
||||
..MerkleProof::default()
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user