Skip to content

Commit 333aae0

Browse files
committed
Merge rust-bitcoin/rust-bitcoin#917: Rename SigHash to Sighash
46c34b3 Fix code comments referring to sighash (Tobin Harding) 8f36c39 Use sighash not sig_hash in identifiers (Tobin Harding) c3a167b Rename SigHash -> Sighash (Tobin Harding) 52b711c Rename InvalidSigHashType -> InvalidSighashType (Tobin Harding) b84f255 Rename SigHashCache -> SighashCache (Tobin Harding) e376525 Rename PsbtSigHashType -> PsbtSighashType (Tobin Harding) c19ec33 Rename NonStandardSigHashType -> NonStandardSighashType (Tobin Harding) 130e273 Rename SigHashTypeParseError -> SighashTypeParseError (Tobin Harding) 6caba2e Rename SchnorrSigHashType -> SchnorrSighashType (Tobin Harding) 5522454 Rename EcdsaSigHashType -> EcdsaSighashType (Tobin Harding) Pull request description: Our usage of `SigHash` implies that 'sighash' is _two_ words; 'sighash' is a well known word in the Bitcoin ecosystem it should appear in identifiers as `Sighash`. Change various types, variants, and code comments to use sighash as a single word. - Patches 1-8 are code changes `s/SigHash/Sighash/g` - Patch 9 is code changes `s/sig_hash/sighash/g` - Patch 11 is docs fixes Fixes: #911 ## Note to reviewers I've been particularly pedantic with the patch separation because we are so close to release. Done as separate patches to make review easier if review is to be done by reading the diffs. Perhaps at least one person could verify this PR programmatically by doing - Reset the last 2 patches (those are easy to do manually) - Check out master - Do `s/SigHash/Sighash/g` on all source files (bash function below) - Use `git diff branchA..branchB` to verify The difference between the two branches should only include comment lines (last three patches) and these seven instances of `SigHash: ``` CHANGELOG.md:82:- [Add FromStr/Display implementation for SigHashType](rust-bitcoin/rust-bitcoin@a4a7035) CHANGELOG.md:93:- [Introduce `SigHashCache` structure](rust-bitcoin/rust-bitcoin#390) to replace `SighashComponents` and support all sighash modes CHANGELOG.md:121: - `SigHash` src/blockdata/transaction.rs:1190: "SigHash_None", src/blockdata/transaction.rs:1191: "SigHash_NONE", src/util/sighash.rs:1175: "SigHash_None", src/util/sighash.rs:1176: "SigHash_NONE", ``` In case its useful, the shell function I used to do these changes is: ```bash function search-and-replace() { if (($# != 2)) then echo "Usage: $0 <this> <that>" return fi local this="$1" local that="$2" # For all files containing $this, replace $this with $that. for file in $(git grep -l "$this") do perl -pi -e "s/$this/$that/g" "$file" done } ``` ACKs for top commit: dr-orlovsky: ACK 46c34b3 apoelstra: ACK 46c34b3 Tree-SHA512: fe7e25e9cfb5155e4921de5ac185dbf9f4ca0770846d7892f6968b44fc5431f3f1a183380107449e90f7ea662094c60b118dc0468230384e8f9a8ef98d5ee0a0
2 parents e16c17c + 4b21ebe commit 333aae0

File tree

12 files changed

+373
-373
lines changed

12 files changed

+373
-373
lines changed

src/blockdata/transaction.rs

Lines changed: 95 additions & 95 deletions
Large diffs are not rendered by default.

src/hash_types.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ macro_rules! impl_hashencode {
4242
hash_newtype!(Txid, sha256d::Hash, 32, doc="A bitcoin transaction hash/transaction ID.");
4343
hash_newtype!(Wtxid, sha256d::Hash, 32, doc="A bitcoin witness transaction ID.");
4444
hash_newtype!(BlockHash, sha256d::Hash, 32, doc="A bitcoin block hash.");
45-
hash_newtype!(SigHash, sha256d::Hash, 32, doc="Hash of the transaction according to the signature algorithm");
45+
hash_newtype!(Sighash, sha256d::Hash, 32, doc="Hash of the transaction according to the signature algorithm");
4646

4747
hash_newtype!(PubkeyHash, hash160::Hash, 20, doc="A hash of a public key.");
4848
hash_newtype!(ScriptHash, hash160::Hash, 20, doc="A hash of Bitcoin Script bytecode.");
@@ -61,7 +61,7 @@ hash_newtype!(FilterHeader, sha256d::Hash, 32, doc="Filter header, as defined in
6161
impl_hashencode!(Txid);
6262
impl_hashencode!(Wtxid);
6363
impl_hashencode!(BlockHash);
64-
impl_hashencode!(SigHash);
64+
impl_hashencode!(Sighash);
6565

6666
impl_hashencode!(TxMerkleNode);
6767
impl_hashencode!(WitnessMerkleNode);

src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ pub use blockdata::transaction::Transaction;
123123
pub use blockdata::transaction::TxIn;
124124
pub use blockdata::transaction::TxOut;
125125
pub use blockdata::transaction::OutPoint;
126-
pub use blockdata::transaction::EcdsaSigHashType;
126+
pub use blockdata::transaction::EcdsaSighashType;
127127
pub use blockdata::witness::Witness;
128128
pub use consensus::encode::VarInt;
129129
pub use network::constants::Network;
@@ -134,7 +134,7 @@ pub use util::amount::Amount;
134134
pub use util::amount::Denomination;
135135
pub use util::amount::SignedAmount;
136136
pub use util::merkleblock::MerkleBlock;
137-
pub use util::sighash::SchnorrSigHashType;
137+
pub use util::sighash::SchnorrSighashType;
138138

139139
pub use util::ecdsa::{self, EcdsaSig, EcdsaSigError};
140140
pub use util::schnorr::{self, SchnorrSig, SchnorrSigError};

src/util/bip143.rs

Lines changed: 41 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,10 @@
2020
//!
2121
2222
use hashes::Hash;
23-
use hash_types::SigHash;
23+
use hash_types::Sighash;
2424
use blockdata::script::Script;
2525
use blockdata::witness::Witness;
26-
use blockdata::transaction::{Transaction, TxIn, EcdsaSigHashType};
26+
use blockdata::transaction::{Transaction, TxIn, EcdsaSighashType};
2727
use consensus::{encode, Encodable};
2828

2929
use io;
@@ -33,16 +33,16 @@ use util::sighash;
3333
/// Parts of a sighash which are common across inputs or signatures, and which are
3434
/// sufficient (in conjunction with a private key) to sign the transaction
3535
#[derive(Clone, PartialEq, Eq, Debug)]
36-
#[deprecated(since = "0.24.0", note = "please use [sighash::SigHashCache] instead")]
36+
#[deprecated(since = "0.24.0", note = "please use [sighash::SighashCache] instead")]
3737
pub struct SighashComponents {
3838
tx_version: i32,
3939
tx_locktime: u32,
4040
/// Hash of all the previous outputs
41-
pub hash_prevouts: SigHash,
41+
pub hash_prevouts: Sighash,
4242
/// Hash of all the input sequence nos
43-
pub hash_sequence: SigHash,
43+
pub hash_sequence: Sighash,
4444
/// Hash of all the outputs in this transaction
45-
pub hash_outputs: SigHash,
45+
pub hash_outputs: Sighash,
4646
}
4747

4848
#[allow(deprecated)]
@@ -53,27 +53,27 @@ impl SighashComponents {
5353
/// script_sig and witnesses.
5454
pub fn new(tx: &Transaction) -> SighashComponents {
5555
let hash_prevouts = {
56-
let mut enc = SigHash::engine();
56+
let mut enc = Sighash::engine();
5757
for txin in &tx.input {
5858
txin.previous_output.consensus_encode(&mut enc).expect("engines don't error");
5959
}
60-
SigHash::from_engine(enc)
60+
Sighash::from_engine(enc)
6161
};
6262

6363
let hash_sequence = {
64-
let mut enc = SigHash::engine();
64+
let mut enc = Sighash::engine();
6565
for txin in &tx.input {
6666
txin.sequence.consensus_encode(&mut enc).expect("engines don't error");
6767
}
68-
SigHash::from_engine(enc)
68+
Sighash::from_engine(enc)
6969
};
7070

7171
let hash_outputs = {
72-
let mut enc = SigHash::engine();
72+
let mut enc = Sighash::engine();
7373
for txout in &tx.output {
7474
txout.consensus_encode(&mut enc).expect("engines don't error");
7575
}
76-
SigHash::from_engine(enc)
76+
Sighash::from_engine(enc)
7777
};
7878

7979
SighashComponents {
@@ -87,8 +87,8 @@ impl SighashComponents {
8787

8888
/// Compute the BIP143 sighash for a `SIGHASH_ALL` signature for the given
8989
/// input.
90-
pub fn sighash_all(&self, txin: &TxIn, script_code: &Script, value: u64) -> SigHash {
91-
let mut enc = SigHash::engine();
90+
pub fn sighash_all(&self, txin: &TxIn, script_code: &Script, value: u64) -> Sighash {
91+
let mut enc = Sighash::engine();
9292
self.tx_version.consensus_encode(&mut enc).expect("engines don't error");
9393
self.hash_prevouts.consensus_encode(&mut enc).expect("engines don't error");
9494
self.hash_sequence.consensus_encode(&mut enc).expect("engines don't error");
@@ -102,14 +102,14 @@ impl SighashComponents {
102102
self.hash_outputs.consensus_encode(&mut enc).expect("engines don't error");
103103
self.tx_locktime.consensus_encode(&mut enc).expect("engines don't error");
104104
1u32.consensus_encode(&mut enc).expect("engines don't error"); // hashtype
105-
SigHash::from_engine(enc)
105+
Sighash::from_engine(enc)
106106
}
107107
}
108108

109109
/// A replacement for SigHashComponents which supports all sighash modes
110-
#[deprecated(since = "0.28.0", note = "please use [sighash::SigHashCache] instead")]
110+
#[deprecated(since = "0.28.0", note = "please use [sighash::SighashCache] instead")]
111111
pub struct SigHashCache<R: Deref<Target = Transaction>> {
112-
cache: sighash::SigHashCache<R>,
112+
cache: sighash::SighashCache<R>,
113113
}
114114

115115
#[allow(deprecated)]
@@ -119,7 +119,7 @@ impl<R: Deref<Target = Transaction>> SigHashCache<R> {
119119
/// For the generated sighashes to be valid, no fields in the transaction may change except for
120120
/// script_sig and witnesses.
121121
pub fn new(tx: R) -> Self {
122-
Self { cache: sighash::SigHashCache::new(tx) }
122+
Self { cache: sighash::SighashCache::new(tx) }
123123
}
124124

125125
/// Encode the BIP143 signing data for any flag type into a given object implementing a
@@ -130,7 +130,7 @@ impl<R: Deref<Target = Transaction>> SigHashCache<R> {
130130
input_index: usize,
131131
script_code: &Script,
132132
value: u64,
133-
sighash_type: EcdsaSigHashType,
133+
sighash_type: EcdsaSighashType,
134134
) -> Result<(), encode::Error> {
135135
self.cache
136136
.segwit_encode_signing_data_to(writer, input_index, script_code, value, sighash_type)
@@ -145,12 +145,12 @@ impl<R: Deref<Target = Transaction>> SigHashCache<R> {
145145
input_index: usize,
146146
script_code: &Script,
147147
value: u64,
148-
sighash_type: EcdsaSigHashType
149-
) -> SigHash {
150-
let mut enc = SigHash::engine();
148+
sighash_type: EcdsaSighashType
149+
) -> Sighash {
150+
let mut enc = Sighash::engine();
151151
self.encode_signing_data_to(&mut enc, input_index, script_code, value, sighash_type)
152152
.expect("engines don't error");
153-
SigHash::from_engine(enc)
153+
Sighash::from_engine(enc)
154154
}
155155
}
156156

@@ -164,7 +164,7 @@ impl<R: DerefMut<Target = Transaction>> SigHashCache<R> {
164164
/// panics if `input_index` is out of bounds with respect of the number of inputs
165165
///
166166
/// ```
167-
/// use bitcoin::blockdata::transaction::{Transaction, EcdsaSigHashType};
167+
/// use bitcoin::blockdata::transaction::{Transaction, EcdsaSighashType};
168168
/// use bitcoin::util::bip143::SigHashCache;
169169
/// use bitcoin::Script;
170170
///
@@ -174,7 +174,7 @@ impl<R: DerefMut<Target = Transaction>> SigHashCache<R> {
174174
/// let mut sig_hasher = SigHashCache::new(&mut tx_to_sign);
175175
/// for inp in 0..input_count {
176176
/// let prevout_script = Script::new();
177-
/// let _sighash = sig_hasher.signature_hash(inp, &prevout_script, 42, EcdsaSigHashType::All);
177+
/// let _sighash = sig_hasher.signature_hash(inp, &prevout_script, 42, EcdsaSighashType::All);
178178
/// // ... sign the sighash
179179
/// sig_hasher.access_witness(inp).push(&[]);
180180
/// }
@@ -188,7 +188,7 @@ impl<R: DerefMut<Target = Transaction>> SigHashCache<R> {
188188
#[allow(deprecated)]
189189
mod tests {
190190
use std::str::FromStr;
191-
use hash_types::SigHash;
191+
use hash_types::Sighash;
192192
use blockdata::script::Script;
193193
use blockdata::transaction::Transaction;
194194
use consensus::encode::deserialize;
@@ -208,10 +208,10 @@ mod tests {
208208
fn run_test_sighash_bip143(tx: &str, script: &str, input_index: usize, value: u64, hash_type: u32, expected_result: &str) {
209209
let tx: Transaction = deserialize(&Vec::<u8>::from_hex(tx).unwrap()[..]).unwrap();
210210
let script = Script::from(Vec::<u8>::from_hex(script).unwrap());
211-
let raw_expected = SigHash::from_hex(expected_result).unwrap();
212-
let expected_result = SigHash::from_slice(&raw_expected[..]).unwrap();
211+
let raw_expected = Sighash::from_hex(expected_result).unwrap();
212+
let expected_result = Sighash::from_slice(&raw_expected[..]).unwrap();
213213
let mut cache = SigHashCache::new(&tx);
214-
let sighash_type = EcdsaSigHashType::from_u32_consensus(hash_type);
214+
let sighash_type = EcdsaSighashType::from_u32_consensus(hash_type);
215215
let actual_result = cache.signature_hash(input_index, &script, value, sighash_type);
216216
assert_eq!(actual_result, expected_result);
217217
}
@@ -237,20 +237,20 @@ mod tests {
237237
tx_version: 1,
238238
tx_locktime: 17,
239239
hash_prevouts: hex_hash!(
240-
SigHash, "96b827c8483d4e9b96712b6713a7b68d6e8003a781feba36c31143470b4efd37"
240+
Sighash, "96b827c8483d4e9b96712b6713a7b68d6e8003a781feba36c31143470b4efd37"
241241
),
242242
hash_sequence: hex_hash!(
243-
SigHash, "52b0a642eea2fb7ae638c36f6252b6750293dbe574a806984b8e4d8548339a3b"
243+
Sighash, "52b0a642eea2fb7ae638c36f6252b6750293dbe574a806984b8e4d8548339a3b"
244244
),
245245
hash_outputs: hex_hash!(
246-
SigHash, "863ef3e1a92afbfdb97f31ad0fc7683ee943e9abcf2501590ff8f6551f47e5e5"
246+
Sighash, "863ef3e1a92afbfdb97f31ad0fc7683ee943e9abcf2501590ff8f6551f47e5e5"
247247
),
248248
}
249249
);
250250

251251
assert_eq!(
252252
comp.sighash_all(&tx.input[1], &witness_script, value),
253-
hex_hash!(SigHash, "c37af31116d1b27caf68aae9e3ac82f1477929014d5b917657d0eb49478cb670")
253+
hex_hash!(Sighash, "c37af31116d1b27caf68aae9e3ac82f1477929014d5b917657d0eb49478cb670")
254254
);
255255
}
256256

@@ -273,20 +273,20 @@ mod tests {
273273
tx_version: 1,
274274
tx_locktime: 1170,
275275
hash_prevouts: hex_hash!(
276-
SigHash, "b0287b4a252ac05af83d2dcef00ba313af78a3e9c329afa216eb3aa2a7b4613a"
276+
Sighash, "b0287b4a252ac05af83d2dcef00ba313af78a3e9c329afa216eb3aa2a7b4613a"
277277
),
278278
hash_sequence: hex_hash!(
279-
SigHash, "18606b350cd8bf565266bc352f0caddcf01e8fa789dd8a15386327cf8cabe198"
279+
Sighash, "18606b350cd8bf565266bc352f0caddcf01e8fa789dd8a15386327cf8cabe198"
280280
),
281281
hash_outputs: hex_hash!(
282-
SigHash, "de984f44532e2173ca0d64314fcefe6d30da6f8cf27bafa706da61df8a226c83"
282+
Sighash, "de984f44532e2173ca0d64314fcefe6d30da6f8cf27bafa706da61df8a226c83"
283283
),
284284
}
285285
);
286286

287287
assert_eq!(
288288
comp.sighash_all(&tx.input[0], &witness_script, value),
289-
hex_hash!(SigHash, "64f3b0f4dd2bb3aa1ce8566d220cc74dda9df97d8490cc81d89d735c92e59fb6")
289+
hex_hash!(Sighash, "64f3b0f4dd2bb3aa1ce8566d220cc74dda9df97d8490cc81d89d735c92e59fb6")
290290
);
291291
}
292292

@@ -316,20 +316,20 @@ mod tests {
316316
tx_version: 1,
317317
tx_locktime: 0,
318318
hash_prevouts: hex_hash!(
319-
SigHash, "74afdc312af5183c4198a40ca3c1a275b485496dd3929bca388c4b5e31f7aaa0"
319+
Sighash, "74afdc312af5183c4198a40ca3c1a275b485496dd3929bca388c4b5e31f7aaa0"
320320
),
321321
hash_sequence: hex_hash!(
322-
SigHash, "3bb13029ce7b1f559ef5e747fcac439f1455a2ec7c5f09b72290795e70665044"
322+
Sighash, "3bb13029ce7b1f559ef5e747fcac439f1455a2ec7c5f09b72290795e70665044"
323323
),
324324
hash_outputs: hex_hash!(
325-
SigHash, "bc4d309071414bed932f98832b27b4d76dad7e6c1346f487a8fdbb8eb90307cc"
325+
Sighash, "bc4d309071414bed932f98832b27b4d76dad7e6c1346f487a8fdbb8eb90307cc"
326326
),
327327
}
328328
);
329329

330330
assert_eq!(
331331
comp.sighash_all(&tx.input[0], &witness_script, value),
332-
hex_hash!(SigHash, "185c0be5263dce5b4bb50a047973c1b6272bfbd0103a89444597dc40b248ee7c")
332+
hex_hash!(Sighash, "185c0be5263dce5b4bb50a047973c1b6272bfbd0103a89444597dc40b248ee7c")
333333
);
334334
}
335335
#[test]

src/util/ecdsa.rs

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,9 @@ use prelude::*;
2020
use core::str::FromStr;
2121
use core::{fmt, iter};
2222
use hashes::hex::{self, FromHex};
23-
use blockdata::transaction::NonStandardSigHashType;
23+
use blockdata::transaction::NonStandardSighashType;
2424
use secp256k1;
25-
use EcdsaSigHashType;
25+
use EcdsaSighashType;
2626

2727
/// An ECDSA signature with the corresponding hash type.
2828
#[derive(Debug, Copy, Clone, PartialEq, Eq)]
@@ -31,24 +31,24 @@ pub struct EcdsaSig {
3131
/// The underlying ECDSA Signature
3232
pub sig: secp256k1::ecdsa::Signature,
3333
/// The corresponding hash type
34-
pub hash_ty: EcdsaSigHashType,
34+
pub hash_ty: EcdsaSighashType,
3535
}
3636

3737
impl EcdsaSig {
38-
/// Constructs ECDSA bitcoin signature for [`EcdsaSigHashType::All`]
38+
/// Constructs ECDSA bitcoin signature for [`EcdsaSighashType::All`]
3939
pub fn sighash_all(sig: secp256k1::ecdsa::Signature) -> EcdsaSig {
4040
EcdsaSig {
4141
sig,
42-
hash_ty: EcdsaSigHashType::All
42+
hash_ty: EcdsaSighashType::All
4343
}
4444
}
4545

46-
/// Deserialize from slice following the standardness rules for [`EcdsaSigHashType`]
46+
/// Deserialize from slice following the standardness rules for [`EcdsaSighashType`]
4747
pub fn from_slice(sl: &[u8]) -> Result<Self, EcdsaSigError> {
4848
let (hash_ty, sig) = sl.split_last()
4949
.ok_or(EcdsaSigError::EmptySignature)?;
50-
let hash_ty = EcdsaSigHashType::from_standard(*hash_ty as u32)
51-
.map_err(|_| EcdsaSigError::NonStandardSigHashType(*hash_ty as u32))?;
50+
let hash_ty = EcdsaSighashType::from_standard(*hash_ty as u32)
51+
.map_err(|_| EcdsaSigError::NonStandardSighashType(*hash_ty as u32))?;
5252
let sig = secp256k1::ecdsa::Signature::from_der(sig)
5353
.map_err(EcdsaSigError::Secp256k1)?;
5454
Ok(EcdsaSig { sig, hash_ty })
@@ -80,7 +80,7 @@ impl FromStr for EcdsaSig {
8080
.ok_or(EcdsaSigError::EmptySignature)?;
8181
Ok(EcdsaSig {
8282
sig: secp256k1::ecdsa::Signature::from_der(signature)?,
83-
hash_ty: EcdsaSigHashType::from_standard(*sighash_byte as u32)?
83+
hash_ty: EcdsaSighashType::from_standard(*sighash_byte as u32)?
8484
})
8585
}
8686
}
@@ -91,7 +91,7 @@ pub enum EcdsaSigError {
9191
/// Hex encoding error
9292
HexEncoding(hex::Error),
9393
/// Base58 encoding error
94-
NonStandardSigHashType(u32),
94+
NonStandardSighashType(u32),
9595
/// Empty Signature
9696
EmptySignature,
9797
/// secp256k1-related error
@@ -102,7 +102,7 @@ pub enum EcdsaSigError {
102102
impl fmt::Display for EcdsaSigError {
103103
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
104104
match *self {
105-
EcdsaSigError::NonStandardSigHashType(hash_ty) =>
105+
EcdsaSigError::NonStandardSighashType(hash_ty) =>
106106
write!(f, "Non standard signature hash type {}", hash_ty),
107107
EcdsaSigError::Secp256k1(ref e) =>
108108
write!(f, "Invalid Ecdsa signature: {}", e),
@@ -123,9 +123,9 @@ impl From<secp256k1::Error> for EcdsaSigError {
123123
}
124124
}
125125

126-
impl From<NonStandardSigHashType> for EcdsaSigError {
127-
fn from(err: NonStandardSigHashType) -> Self {
128-
EcdsaSigError::NonStandardSigHashType(err.0)
126+
impl From<NonStandardSighashType> for EcdsaSigError {
127+
fn from(err: NonStandardSighashType) -> Self {
128+
EcdsaSigError::NonStandardSighashType(err.0)
129129
}
130130
}
131131

src/util/psbt/error.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,8 @@ pub enum Error {
6161
/// Actual
6262
actual: Box<Transaction>,
6363
},
64-
/// Unable to parse as a standard SigHash type.
65-
NonStandardSigHashType(u32),
64+
/// Unable to parse as a standard sighash type.
65+
NonStandardSighashType(u32),
6666
/// Parsing errors from bitcoin_hashes
6767
HashParseError(hashes::Error),
6868
/// The pre-image must hash to the correponding psbt hash
@@ -88,7 +88,7 @@ impl fmt::Display for Error {
8888
Error::InvalidProprietaryKey => write!(f, "non-proprietary key type found when proprietary key was expected"),
8989
Error::DuplicateKey(ref rkey) => write!(f, "duplicate key: {}", rkey),
9090
Error::UnexpectedUnsignedTx { expected: ref e, actual: ref a } => write!(f, "different unsigned transaction: expected {}, actual {}", e.txid(), a.txid()),
91-
Error::NonStandardSigHashType(ref sht) => write!(f, "non-standard sighash type: {}", sht),
91+
Error::NonStandardSighashType(ref sht) => write!(f, "non-standard sighash type: {}", sht),
9292
Error::InvalidMagic => f.write_str("invalid magic"),
9393
Error::InvalidSeparator => f.write_str("invalid separator"),
9494
Error::UnsignedTxHasScriptSigs => f.write_str("the unsigned transaction has script sigs"),

0 commit comments

Comments
 (0)