Skip to content

Conversation

@karliatto
Copy link
Contributor

The example cookbook/src/psbt/multiple_inputs_segwit-v0.md had some missing imports and some unnecessary ones.

@tcharding
Copy link
Member

Thanks for the contribution! This made me wonder why it wasn't caught by CI. The reason is that the rustdoc block patched is imports only.

I believe the import block should mirror the one right at the bottom. Furthermore I think they should both be improved to be like this:

use std::collections::BTreeMap;
use std::str::FromStr;

use bitcoin::bip32::{ChildNumber, Fingerprint, IntoDerivationPath as _, Xpriv, Xpub};
use bitcoin::hashes::Hash;
use bitcoin::locktime::absolute;
use bitcoin::secp256k1::{Secp256k1, Signing};
use bitcoin::{
    consensus, psbt, transaction, Address, Amount, EcdsaSighashType, Network, OutPoint, Psbt,
    ScriptBuf, Sequence, Transaction, TxIn, TxOut, Txid, WPubkeyHash, Witness,
};

Note that this requires changing all instances of Input to psbt::Input.

@karliatto
Copy link
Contributor Author

Sure, that makes sense. I applied the changes you suggested 8a0bf08

@tcharding
Copy link
Member

You forgot to squash the fixup! commit mate.

@karliatto karliatto force-pushed the fix/missing-import-example branch from 8a0bf08 to b369269 Compare January 3, 2025 08:45
@karliatto
Copy link
Contributor Author

You forgot to squash the fixup! commit mate.

Done.

Copy link
Member

@tcharding tcharding left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK b369269

@tcharding
Copy link
Member

Killed it, thanks bro.

@apoelstra apoelstra merged commit 74ea881 into rust-bitcoin:master Jan 5, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants