Merge rust-bitcoin/rust-bitcoin#4246: fix spelling issues
441e173792
Update owned.rs (planetBoy)dd6687d992
Update sighash.rs (planetBoy) Pull request description: bitcoin/examples/sighash.rs inde - index `fix errors` bitcoin/src/blockdata/script/owned.rs paics - panics `fix errors` ACKs for top commit: Kixunil: ACK441e173792
tcharding: ACK441e173792
Tree-SHA512: a040cfd58f0ce17d8698da6f815705da77557d99d6c1b0e7d30696ff38a72857ed17e93aea169890983bdd6c36b9b8617e435178b94014a5bba3eacc7f4286b0
This commit is contained in:
commit
ac502b0fc3
|
@ -57,7 +57,7 @@ fn compute_sighash_p2wpkh(raw_tx: &[u8], inp_idx: usize, amount: Amount) {
|
||||||
/// # Parameters
|
/// # Parameters
|
||||||
///
|
///
|
||||||
/// * `raw_tx` - spending tx hex
|
/// * `raw_tx` - spending tx hex
|
||||||
/// * `inp_idx` - spending tx input inde
|
/// * `inp_idx` - spending tx input index
|
||||||
/// * `script_pubkey_bytes_opt` - Option with scriptPubKey bytes. If None, it's p2sh case, i.e., reftx output's scriptPubKey.type is "scripthash". In this case scriptPubkey is extracted from the spending transaction's scriptSig. If Some(), it's p2ms case, i.e., reftx output's scriptPubKey.type is "multisig", and the scriptPubkey is supplied from the referenced output.
|
/// * `script_pubkey_bytes_opt` - Option with scriptPubKey bytes. If None, it's p2sh case, i.e., reftx output's scriptPubKey.type is "scripthash". In this case scriptPubkey is extracted from the spending transaction's scriptSig. If Some(), it's p2ms case, i.e., reftx output's scriptPubKey.type is "multisig", and the scriptPubkey is supplied from the referenced output.
|
||||||
fn compute_sighash_legacy(raw_tx: &[u8], inp_idx: usize, script_pubkey_bytes_opt: Option<&[u8]>) {
|
fn compute_sighash_legacy(raw_tx: &[u8], inp_idx: usize, script_pubkey_bytes_opt: Option<&[u8]>) {
|
||||||
let tx: Transaction = consensus::deserialize(raw_tx).unwrap();
|
let tx: Transaction = consensus::deserialize(raw_tx).unwrap();
|
||||||
|
|
|
@ -203,7 +203,7 @@ impl<'a> Extend<Instruction<'a>> for ScriptBuf {
|
||||||
/// Pretends that this is a mutable reference to [`ScriptBuf`]'s internal buffer.
|
/// Pretends that this is a mutable reference to [`ScriptBuf`]'s internal buffer.
|
||||||
///
|
///
|
||||||
/// In reality the backing `Vec<u8>` is swapped with an empty one and this is holding both the
|
/// In reality the backing `Vec<u8>` is swapped with an empty one and this is holding both the
|
||||||
/// reference and the vec. The vec is put back when this drops so it also covers paics. (But not
|
/// reference and the vec. The vec is put back when this drops so it also covers panics. (But not
|
||||||
/// leaks, which is OK since we never leak.)
|
/// leaks, which is OK since we never leak.)
|
||||||
pub(crate) struct ScriptBufAsVec<'a>(&'a mut ScriptBuf, Vec<u8>);
|
pub(crate) struct ScriptBufAsVec<'a>(&'a mut ScriptBuf, Vec<u8>);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue