aboutsummaryrefslogtreecommitdiff
path: root/src/psbt.h
diff options
context:
space:
mode:
authorGlenn Willen <gwillen@nerdnet.org>2019-03-12 16:08:35 -0700
committerGlenn Willen <gwillen@nerdnet.org>2019-03-26 17:38:00 -0700
commit892eff05f115c0b002d0e0b6ffc3ab418480d25c (patch)
tree452dd0a9acdfedd386e6884bfa65c2c740b6e25d /src/psbt.h
parentef22fe8c1f331b4f13f21a54d12030b92e83fbe7 (diff)
downloadbitcoin-892eff05f115c0b002d0e0b6ffc3ab418480d25c.tar.xz
Add documentation of struct PSBTAnalysis et al
Diffstat (limited to 'src/psbt.h')
-rw-r--r--src/psbt.h32
1 files changed, 19 insertions, 13 deletions
diff --git a/src/psbt.h b/src/psbt.h
index 0f17a71a44..fcb3337a53 100644
--- a/src/psbt.h
+++ b/src/psbt.h
@@ -557,23 +557,29 @@ enum class PSBTRole {
EXTRACTOR
};
+/**
+ * Holds an analysis of one input from a PSBT
+ */
struct PSBTInputAnalysis {
- bool has_utxo;
- bool is_final;
- PSBTRole next;
-
- std::vector<CKeyID> missing_pubkeys;
- std::vector<CKeyID> missing_sigs;
- uint160 missing_redeem_script;
- uint256 missing_witness_script;
+ bool has_utxo; //!< Whether we have UTXO information for this input
+ bool is_final; //!< Whether the input has all required information including signatures
+ PSBTRole next; //!< Which of the BIP 174 roles needs to handle this input next
+
+ std::vector<CKeyID> missing_pubkeys; //!< Pubkeys whose BIP32 derivation path is missing
+ std::vector<CKeyID> missing_sigs; //!< Pubkeys whose signatures are missing
+ uint160 missing_redeem_script; //!< Hash160 of redeem script, if missing
+ uint256 missing_witness_script; //!< SHA256 of witness script, if missing
};
+/**
+ * Holds the results of AnalyzePSBT (miscellaneous information about a PSBT)
+ */
struct PSBTAnalysis {
- Optional<size_t> estimated_vsize;
- Optional<CFeeRate> estimated_feerate;
- Optional<CAmount> fee;
- std::vector<PSBTInputAnalysis> inputs;
- PSBTRole next;
+ Optional<size_t> estimated_vsize; //!< Estimated weight of the transaction
+ Optional<CFeeRate> estimated_feerate; //!< Estimated feerate (fee / weight) of the transaction
+ Optional<CAmount> fee; //!< Amount of fee being paid by the transaction
+ std::vector<PSBTInputAnalysis> inputs; //!< More information about the individual inputs of the transaction
+ PSBTRole next; //!< Which of the BIP 174 roles needs to handle the transaction next
};
std::string PSBTRoleName(PSBTRole role);