CTxIn using the ToString, we get the scriptSig, but would also help to get the witness.
CTxIn using the ToString, we get the scriptSig, but would also help to get the witness.
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.
For details see: https://corecheck.dev/bitcoin/bitcoin/pulls/33711.
See the guideline for information on the review process.
| Type | Reviewers |
|---|---|
| Concept ACK | optout21 |
If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update.
Concept ACK 61cd0e53ca45684cd5ef9084829ecc6d59154595
I notice that CTransaction::ToString() prints the inputs and the input script witnesses additionally, with that change script witnesses will be included duplicated. The order there is first all inputs, then all witnesses. Please consider removing the duplication.
Options:
CTxIn::ToString() without witness?https://github.com/bitcoin/bitcoin/blob/master/src/primitives/transaction.cpp#L126
0 for (const auto& tx_in : vin)
1 str += " " + tx_in.ToString() + "\n";
2 for (const auto& tx_in : vin)
3 str += " " + tx_in.scriptWitness.ToString() + "\n";