Merge rust-bitcoin/rust-bitcoin#2887: Remove `InvalidInternalKey` variant from `TaprootBuilderError`

72655607b6 api: Run just check-api (Tobin C. Harding)
e8250cd96a Remove InvalidInternalKey variant from TaprootBuilderError (Tobin C. Harding)

Pull request description:

  This variant is unused, remove it.

  Done as part of #2883.

ACKs for top commit:
  Kixunil:
    ACK 72655607b6
  apoelstra:
    ACK 72655607b6

Tree-SHA512: 5cd27cacebcf078afdf1ceba4e3d51e78f20ee4883000b766efb7a246fd7a166240038a2e7d27249a22049c3258673a393ff2fd62cb4b27a2cade04b28ef2ac9
This commit is contained in:
Andrew Poelstra 2024-06-22 21:04:44 +00:00
commit 09740853a9
No known key found for this signature in database
GPG Key ID: C588D63CE41B97C1
4 changed files with 0 additions and 9 deletions

View File

@ -5633,7 +5633,6 @@ pub bitcoin::taproot::Signature::signature: secp256k1::schnorr::Signature
pub bitcoin::taproot::TapLeaf::Hidden(bitcoin::taproot::TapNodeHash) pub bitcoin::taproot::TapLeaf::Hidden(bitcoin::taproot::TapNodeHash)
pub bitcoin::taproot::TapLeaf::Script(bitcoin::blockdata::script::ScriptBuf, bitcoin::taproot::LeafVersion) pub bitcoin::taproot::TapLeaf::Script(bitcoin::blockdata::script::ScriptBuf, bitcoin::taproot::LeafVersion)
pub bitcoin::taproot::TaprootBuilderError::EmptyTree pub bitcoin::taproot::TaprootBuilderError::EmptyTree
pub bitcoin::taproot::TaprootBuilderError::InvalidInternalKey(secp256k1::Error)
pub bitcoin::taproot::TaprootBuilderError::InvalidMerkleTreeDepth(usize) pub bitcoin::taproot::TaprootBuilderError::InvalidMerkleTreeDepth(usize)
pub bitcoin::taproot::TaprootBuilderError::NodeNotInDfsOrder pub bitcoin::taproot::TaprootBuilderError::NodeNotInDfsOrder
pub bitcoin::taproot::TaprootBuilderError::OverCompleteTree pub bitcoin::taproot::TaprootBuilderError::OverCompleteTree

View File

@ -5353,7 +5353,6 @@ pub bitcoin::taproot::Signature::signature: secp256k1::schnorr::Signature
pub bitcoin::taproot::TapLeaf::Hidden(bitcoin::taproot::TapNodeHash) pub bitcoin::taproot::TapLeaf::Hidden(bitcoin::taproot::TapNodeHash)
pub bitcoin::taproot::TapLeaf::Script(bitcoin::blockdata::script::ScriptBuf, bitcoin::taproot::LeafVersion) pub bitcoin::taproot::TapLeaf::Script(bitcoin::blockdata::script::ScriptBuf, bitcoin::taproot::LeafVersion)
pub bitcoin::taproot::TaprootBuilderError::EmptyTree pub bitcoin::taproot::TaprootBuilderError::EmptyTree
pub bitcoin::taproot::TaprootBuilderError::InvalidInternalKey(secp256k1::Error)
pub bitcoin::taproot::TaprootBuilderError::InvalidMerkleTreeDepth(usize) pub bitcoin::taproot::TaprootBuilderError::InvalidMerkleTreeDepth(usize)
pub bitcoin::taproot::TaprootBuilderError::NodeNotInDfsOrder pub bitcoin::taproot::TaprootBuilderError::NodeNotInDfsOrder
pub bitcoin::taproot::TaprootBuilderError::OverCompleteTree pub bitcoin::taproot::TaprootBuilderError::OverCompleteTree

View File

@ -4736,7 +4736,6 @@ pub bitcoin::taproot::Signature::signature: secp256k1::schnorr::Signature
pub bitcoin::taproot::TapLeaf::Hidden(bitcoin::taproot::TapNodeHash) pub bitcoin::taproot::TapLeaf::Hidden(bitcoin::taproot::TapNodeHash)
pub bitcoin::taproot::TapLeaf::Script(bitcoin::blockdata::script::ScriptBuf, bitcoin::taproot::LeafVersion) pub bitcoin::taproot::TapLeaf::Script(bitcoin::blockdata::script::ScriptBuf, bitcoin::taproot::LeafVersion)
pub bitcoin::taproot::TaprootBuilderError::EmptyTree pub bitcoin::taproot::TaprootBuilderError::EmptyTree
pub bitcoin::taproot::TaprootBuilderError::InvalidInternalKey(secp256k1::Error)
pub bitcoin::taproot::TaprootBuilderError::InvalidMerkleTreeDepth(usize) pub bitcoin::taproot::TaprootBuilderError::InvalidMerkleTreeDepth(usize)
pub bitcoin::taproot::TaprootBuilderError::NodeNotInDfsOrder pub bitcoin::taproot::TaprootBuilderError::NodeNotInDfsOrder
pub bitcoin::taproot::TaprootBuilderError::OverCompleteTree pub bitcoin::taproot::TaprootBuilderError::OverCompleteTree

View File

@ -1337,8 +1337,6 @@ pub enum TaprootBuilderError {
NodeNotInDfsOrder, NodeNotInDfsOrder,
/// Two nodes at depth 0 are not allowed. /// Two nodes at depth 0 are not allowed.
OverCompleteTree, OverCompleteTree,
/// Invalid taproot internal key.
InvalidInternalKey(secp256k1::Error),
/// Called finalize on a empty tree. /// Called finalize on a empty tree.
EmptyTree, EmptyTree,
} }
@ -1365,9 +1363,6 @@ impl fmt::Display for TaprootBuilderError {
"Attempted to create a tree with two nodes at depth 0. There must\ "Attempted to create a tree with two nodes at depth 0. There must\
only be a exactly one node at depth 0", only be a exactly one node at depth 0",
), ),
InvalidInternalKey(ref e) => {
write_err!(f, "invalid internal x-only key"; e)
}
EmptyTree => { EmptyTree => {
write!(f, "Called finalize on an empty tree") write!(f, "Called finalize on an empty tree")
} }
@ -1381,7 +1376,6 @@ impl std::error::Error for TaprootBuilderError {
use TaprootBuilderError::*; use TaprootBuilderError::*;
match self { match self {
InvalidInternalKey(e) => Some(e),
InvalidMerkleTreeDepth(_) | NodeNotInDfsOrder | OverCompleteTree | EmptyTree => None, InvalidMerkleTreeDepth(_) | NodeNotInDfsOrder | OverCompleteTree | EmptyTree => None,
} }
} }