Skip to content

Commit

Permalink
Remove unused error variants
Browse files Browse the repository at this point in the history
  • Loading branch information
djordon committed Sep 25, 2024
1 parent 4c00a19 commit ef2d03c
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 19 deletions.
18 changes: 0 additions & 18 deletions signer/src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,16 +21,6 @@ pub enum Error {
#[error("Transaction is missing from mempool")]
BitcoinTxMissing(bitcoin::Txid),

/// Returned when we could not decode the hex into a
/// bitcoin::Transaction.
#[error("failed to decode the provided hex into a transaction. txid: {1}. {0}")]
DecodeTx(#[source] bitcoin::consensus::encode::Error, bitcoin::Txid),

/// Could not deserialize the "blockchain.transaction.get" response
/// into a GetTxResponse.
#[error("failed to deserialize the blockchain.transaction.get response. txid: {1}. {0}")]
DeserializeGetTransaction(#[source] serde_json::Error, bitcoin::Txid),

/// Received an error in call to estimatesmartfee RPC call
#[error("failed to get fee estimate from bitcoin-core for target {1}. {0}")]
EstimateSmartFee(#[source] bitcoincore_rpc::Error, u16),
Expand Down Expand Up @@ -68,10 +58,6 @@ pub enum Error {
#[error("tokio i/o error: {0}")]
TokioIo(#[from] tokio::io::Error),

/// The error used in the [`Encode`] and [`Decode`] trait.
#[error("error serializing type: {0}")]
Bincode(#[source] bincode::Error),

/// Error when breaking out the ZeroMQ message into three parts.
#[error("bitcoin messages should have a three part layout, received {0} parts")]
BitcoinCoreZmqMessageLayout(usize),
Expand Down Expand Up @@ -251,10 +237,6 @@ pub enum Error {
#[error("failed to read migration script: {0}")]
ReadSqlMigration(Cow<'static, str>),

/// Could not retrieve the current database name.
#[error("could not retrieve the current database name")]
CurrentDatabaseName,

/// An error when attempting to generically decode bytes using the
/// trait implementation.
#[error("got an error wen attempting to call StacksMessageCodec::consensus_deserialize {0}")]
Expand Down
2 changes: 1 addition & 1 deletion signer/src/util.rs
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ mod tests {
} else {
// Just picked a random error here (which isn't
// a AllFailoverClientsFailed)
Err(Error::CurrentDatabaseName)
Err(Error::Encryption)
}
}
}
Expand Down

0 comments on commit ef2d03c

Please sign in to comment.