Manually implement it for Wtxid, Txid and BlockHash, where the all-zero "hash" has a consensus meaning. But in general we should not be implementing this method unless we have a good reason to do so. It can be emulated or implemeted in terms of from_byte_array. The use of Wtxid::all_zeros is obscure and specific enough that I am tempted to drop it. But for txid and blockhash, the 0 hash appears in actual blockdata and we should keep it. All other uses of all_zeros were either in test code or in places where the specific hash was not important and [u8; 32] was a more appropriate type. |
||
---|---|---|
.. | ||
contrib | ||
embedded | ||
examples | ||
src | ||
tests | ||
CHANGELOG.md | ||
Cargo.toml | ||
build.rs |