Add non_exhaustive to _all_ errors
We are no using `non_exhaustive` on any error types unless we are _really_ sure there will be no additional variants required. There are only three error enums that do not have it in the codebase as of this commit, add it to all three.
This commit is contained in:
parent
9bac1a0b8b
commit
a37ab82503
|
@ -20,6 +20,7 @@ use crate::{Block, BlockHash, BlockHeader, Transaction};
|
|||
|
||||
/// A BIP-152 error
|
||||
#[derive(Clone, PartialEq, Eq, Debug, Copy, PartialOrd, Ord, Hash)]
|
||||
#[non_exhaustive]
|
||||
pub enum Error {
|
||||
/// An unknown version number was used.
|
||||
UnknownVersion,
|
||||
|
|
|
@ -57,6 +57,7 @@ const M: u64 = 784931;
|
|||
|
||||
/// Errors for blockfilter
|
||||
#[derive(Debug)]
|
||||
#[non_exhaustive]
|
||||
pub enum Error {
|
||||
/// missing UTXO, can not calculate script filter
|
||||
UtxoMissing(OutPoint),
|
||||
|
|
|
@ -55,6 +55,7 @@ use crate::{Block, BlockHeader};
|
|||
|
||||
/// An error when verifying the merkle block
|
||||
#[derive(Clone, PartialEq, Eq, Debug)]
|
||||
#[non_exhaustive]
|
||||
pub enum MerkleBlockError {
|
||||
/// When header merkle root don't match to the root calculated from the partial merkle tree
|
||||
MerkleRootMismatch,
|
||||
|
|
Loading…
Reference in New Issue