Move sighash to crypto module
There is never any use for the `sighash` module unless one is signing, which requires the `crypto` module. The `sighash` module should therefore live in the `crypto` module. This is not an API breaking change because we reexport it at the crate root.
This commit is contained in:
parent
ad50fd728f
commit
c5fe315a93
|
@ -9,3 +9,4 @@
|
|||
pub mod ecdsa;
|
||||
pub mod key;
|
||||
pub mod schnorr;
|
||||
pub mod sighash;
|
||||
|
|
|
@ -1126,7 +1126,7 @@ mod tests {
|
|||
// These test vectors were stolen from libbtc, which is Copyright 2014 Jonas Schnelli MIT
|
||||
// They were transformed by replacing {...} with run_test_sighash(...), then the ones containing
|
||||
// OP_CODESEPARATOR in their pubkeys were removed
|
||||
let data = include_str!("../tests/data/legacy_sighash.json");
|
||||
let data = include_str!("../../tests/data/legacy_sighash.json");
|
||||
|
||||
let testdata = serde_json::from_str::<Value>(data).unwrap().as_array().unwrap().clone();
|
||||
for t in testdata.iter().skip(1) {
|
||||
|
@ -1494,7 +1494,7 @@ mod tests {
|
|||
//script_pubkey: Vec<ScriptPubKey>, // unused
|
||||
}
|
||||
|
||||
let json_str = include_str!("../tests/data/bip341_tests.json");
|
||||
let json_str = include_str!("../../tests/data/bip341_tests.json");
|
||||
let mut data =
|
||||
serde_json::from_str::<TestData>(json_str).expect("JSON was not well-formatted");
|
||||
|
|
@ -99,7 +99,6 @@ pub mod merkle_tree;
|
|||
pub mod policy;
|
||||
pub mod pow;
|
||||
pub mod psbt;
|
||||
pub mod sighash;
|
||||
pub mod sign_message;
|
||||
pub mod string;
|
||||
pub mod taproot;
|
||||
|
@ -128,7 +127,7 @@ pub use crate::blockdata::witness::{self, Witness};
|
|||
pub use crate::blockdata::{constants, opcodes};
|
||||
pub use crate::consensus::encode::VarInt;
|
||||
pub use crate::crypto::key::{self, PrivateKey, PublicKey};
|
||||
pub use crate::crypto::{ecdsa, schnorr};
|
||||
pub use crate::crypto::{ecdsa, schnorr, sighash};
|
||||
pub use crate::error::Error;
|
||||
pub use crate::hash_types::{Txid, Wtxid, BlockHash, PubkeyHash, ScriptHash, WPubkeyHash, WScriptHash};
|
||||
pub use crate::merkle_tree::MerkleBlock;
|
||||
|
|
Loading…
Reference in New Issue