-
Notifications
You must be signed in to change notification settings - Fork 155
Update to a dev version latest bitcoin master 0e2e55971275da64ceb62e8991a0a5fa962cb8b1 #289
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -83,7 +83,6 @@ fn main() { | |
0xa9, 0x14, 0x92, 0x09, 0xa8, 0xf9, 0x0c, 0x58, 0x4b, 0xb5, 0x97, 0x4d, 0x58, 0x68, 0x72, | ||
0x49, 0xe5, 0x32, 0xde, 0x59, 0xf4, 0xbc, 0x87, | ||
]); | ||
|
||
let mut interpreter = miniscript::Interpreter::from_txdata( | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What do you think to change the parameter type in If I am looking correctly it's used only for iteration and we have There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, this is an already planned change in a follow-up PR that changes the interpreter API for taproot support. Wanted to keep things simple here (as in just resolving compile errors). There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Does it make sense for psbt FINAL_SCRIPT_WITNESS to be There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Added a follow up commit and discovered that rust-miniscript needs rust-bitcoin/rust-bitcoin#774 for a cleaner non-allocating API. |
||
&spk_input_1, | ||
&transaction.input[0].script_sig, | ||
|
@@ -134,11 +133,13 @@ fn main() { | |
|
||
// We can set the amount passed to `sighash_verify` to 0 because this is a legacy | ||
// transaction and so the amount won't actually be checked by the signature | ||
let vfyfn = interpreter.sighash_verify(&secp, &transaction, 0, 0); | ||
let vfyfn = interpreter | ||
.sighash_verify(&secp, &transaction, 0, 0) | ||
.expect("Can only fail in sighash single when corresponding output is not present"); | ||
// Restrict to sighash_all just to demonstrate how to add additional filters | ||
// `&_` needed here because of https://github.com/rust-lang/rust/issues/79187 | ||
let vfyfn = move |pk: &_, bitcoinsig: miniscript::BitcoinSig| { | ||
bitcoinsig.1 == bitcoin::SigHashType::All && vfyfn(pk, bitcoinsig) | ||
bitcoinsig.1 == bitcoin::EcdsaSigHashType::All && vfyfn(pk, bitcoinsig) | ||
}; | ||
|
||
println!("\nExample two"); | ||
|
@@ -155,7 +156,6 @@ fn main() { | |
// what happens given an apparently invalid script | ||
let secp = secp256k1::Secp256k1::new(); | ||
let message = secp256k1::Message::from_slice(&[0x01; 32][..]).expect("32-byte hash"); | ||
|
||
let mut interpreter = miniscript::Interpreter::from_txdata( | ||
&spk_input_1, | ||
&transaction.input[0].script_sig, | ||
|
@@ -166,7 +166,8 @@ fn main() { | |
.unwrap(); | ||
|
||
let iter = interpreter.iter(|pk, (sig, sighashtype)| { | ||
sighashtype == bitcoin::SigHashType::All && secp.verify(&message, &sig, &pk.key).is_ok() | ||
sighashtype == bitcoin::EcdsaSigHashType::All | ||
&& secp.verify_ecdsa(&message, &sig, &pk.key).is_ok() | ||
}); | ||
println!("\nExample three"); | ||
for elem in iter { | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,6 +7,6 @@ authors = ["Steven Roose <[email protected]>", "Sanket K <sanket1729@gmail. | |
miniscript = {path = "../"} | ||
|
||
# Until 0.26 support is released on rust-bitcoincore-rpc | ||
bitcoincore-rpc = "0.14.0" | ||
bitcoin = "0.27.1" | ||
bitcoincore-rpc = {git = "https://github.com/sanket1729/rust-bitcoincore-rpc",rev = "ae3ad6cac0a83454f267cb7d5191f6607bb80297"} | ||
bitcoin = {git = "https://github.com/rust-bitcoin/rust-bitcoin", rev = "0e2e55971275da64ceb62e8991a0a5fa962cb8b1"} | ||
log = "0.4" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In f3c38b8:
We should drop
fuzztarget
entirely.