Skip to content

Commit

Permalink
add additional instances
Browse files Browse the repository at this point in the history
  • Loading branch information
conradoplg committed Dec 4, 2024
1 parent 55c5ebd commit a15a2e8
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 15 deletions.
2 changes: 1 addition & 1 deletion zebra-chain/src/history_tree.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ pub enum HistoryTreeError {
#[non_exhaustive]
InnerError { inner: zcash_history::Error },

#[error("I/O error")]
#[error("I/O error: {0}")]
IOError(#[from] io::Error),
}

Expand Down
8 changes: 4 additions & 4 deletions zebra-consensus/src/block.rs
Original file line number Diff line number Diff line change
Expand Up @@ -74,19 +74,19 @@ pub enum VerifyBlockError {
#[error(transparent)]
Time(zebra_chain::block::BlockTimeError),

#[error("unable to commit block after semantic verification")]
#[error("unable to commit block after semantic verification: {0}")]
// TODO: make this into a concrete type, and add it to is_duplicate_request() (#2908)
Commit(#[source] BoxError),

#[cfg(feature = "getblocktemplate-rpcs")]
#[error("unable to validate block proposal: failed semantic verification (proof of work is not checked for proposals)")]
#[error("unable to validate block proposal: failed semantic verification (proof of work is not checked for proposals): {0}")]
// TODO: make this into a concrete type (see #5732)
ValidateProposal(#[source] BoxError),

#[error("invalid transaction")]
#[error("invalid transaction: {0}")]
Transaction(#[from] TransactionError),

#[error("invalid block subsidy")]
#[error("invalid block subsidy: {0}")]
Subsidy(#[from] SubsidyError),
}

Expand Down
4 changes: 2 additions & 2 deletions zebra-consensus/src/checkpoint.rs
Original file line number Diff line number Diff line change
Expand Up @@ -992,9 +992,9 @@ pub enum VerifyCheckpointError {
CheckpointList(BoxError),
#[error(transparent)]
VerifyBlock(VerifyBlockError),
#[error("invalid block subsidy")]
#[error("invalid block subsidy: {0}")]
SubsidyError(#[from] SubsidyError),
#[error("invalid amount")]
#[error("invalid amount: {0}")]
AmountError(#[from] amount::Error),
#[error("too many queued blocks at this height")]
QueuedLimit,
Expand Down
4 changes: 2 additions & 2 deletions zebra-network/src/peer/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -251,10 +251,10 @@ pub enum HandshakeError {
#[error("Peer closed connection")]
ConnectionClosed,
/// An error occurred while performing an IO operation.
#[error("Underlying IO error")]
#[error("Underlying IO error: {0}")]
Io(#[from] std::io::Error),
/// A serialization error occurred while reading or writing a message.
#[error("Serialization error")]
#[error("Serialization error: {0}")]
Serialization(#[from] SerializationError),
/// The remote peer offered a version older than our minimum version.
#[error("Peer offered obsolete version: {0:?}")]
Expand Down
6 changes: 3 additions & 3 deletions zebra-state/src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -220,13 +220,13 @@ pub enum ValidateContextError {
height: Option<block::Height>,
},

#[error("error updating a note commitment tree")]
#[error("error updating a note commitment tree: {0}")]
NoteCommitmentTreeError(#[from] zebra_chain::parallel::tree::NoteCommitmentTreeError),

#[error("error building the history tree")]
#[error("error building the history tree: {0}")]
HistoryTreeError(#[from] Arc<HistoryTreeError>),

#[error("block contains an invalid commitment")]
#[error("block contains an invalid commitment: {0}")]
InvalidBlockCommitment(#[from] block::CommitmentError),

#[error(
Expand Down
8 changes: 5 additions & 3 deletions zebrad/src/components/mempool/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,9 @@ pub enum MempoolError {
///
/// Note that the mempool caches this error. See [`super::storage::Storage`]
/// for more details.
#[error("the transaction will be rejected from the mempool until the next chain tip block")]
#[error(
"the transaction will be rejected from the mempool until the next chain tip block: {0}"
)]
StorageExactTip(#[from] ExactTipRejectionError),

/// Transaction rejected based on its effects (spends, outputs, transaction
Expand All @@ -33,7 +35,7 @@ pub enum MempoolError {
///
/// Note that the mempool caches this error. See [`super::storage::Storage`]
/// for more details.
#[error("any transaction with the same effects will be rejected from the mempool until the next chain tip block")]
#[error("any transaction with the same effects will be rejected from the mempool until the next chain tip block: {0}")]
StorageEffectsTip(#[from] SameEffectsTipRejectionError),

/// Transaction rejected based on its effects (spends, outputs, transaction
Expand All @@ -44,7 +46,7 @@ pub enum MempoolError {
///
/// Note that the mempool caches this error. See [`super::storage::Storage`]
/// for more details.
#[error("any transaction with the same effects will be rejected from the mempool until a chain reset")]
#[error("any transaction with the same effects will be rejected from the mempool until a chain reset: {0}")]
StorageEffectsChain(#[from] SameEffectsChainRejectionError),

/// Transaction rejected because the mempool already contains another
Expand Down

0 comments on commit a15a2e8

Please sign in to comment.