rust-bitcoin-unsafe-fast/bitcoin/src/p2p
Andrew Poelstra 8869f35a69
hashes: drop the `all_zeros` method on arbitrary hashes
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.
2024-06-22 15:09:28 +00:00
..
address.rs p2p: Cleanup test imports 2024-05-17 10:57:54 +10:00
message.rs Remove usage of blockdata from paths 2024-06-20 12:00:22 +10:00
message_blockdata.rs hashes: drop the `all_zeros` method on arbitrary hashes 2024-06-22 15:09:28 +00:00
message_bloom.rs Removed //! spare line at end of headers 2024-05-16 09:59:55 +01:00
message_compact_blocks.rs Removed //! spare line at end of headers 2024-05-16 09:59:55 +01:00
message_filter.rs Remove usage of blockdata from paths 2024-06-20 12:00:22 +10:00
message_network.rs p2p: Cleanup test imports 2024-05-17 10:57:54 +10:00
mod.rs Merge rust-bitcoin/rust-bitcoin#2846: generate Network <-> Magic From and TryFrom with a macro 2024-06-10 13:59:52 +00:00