Rename Hash::zero() to Hash::default() (#858)

It is more idiomatic, also `zero` is misleading in context of `+` operator.
This commit is contained in:
Alexey Miroshkin
2018-03-24 00:35:10 +01:00
committed by Ignotus Peverell
parent 388beafb65
commit bb134758e7
6 changed files with 17 additions and 16 deletions
+1 -1
View File
@@ -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
View File
@@ -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()
};