diff options
author | Andrew Chow <achow101-github@achow101.com> | 2021-01-04 17:21:29 -0500 |
---|---|---|
committer | Andrew Chow <achow101-github@achow101.com> | 2021-12-10 08:29:26 -0500 |
commit | df84fa99c5a52e4688e240c585f7d22b20401906 (patch) | |
tree | ef13fd5d4bc921484acb223bc5cce603de38dab7 /src/psbt.cpp | |
parent | c3eb416b882522dffa4254b52d2da5b53c970efe (diff) | |
download | bitcoin-df84fa99c5a52e4688e240c585f7d22b20401906.tar.xz |
Add GetVersion helper to PSBT
Diffstat (limited to 'src/psbt.cpp')
-rw-r--r-- | src/psbt.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/psbt.cpp b/src/psbt.cpp index 6585766807..f3ecbd63d2 100644 --- a/src/psbt.cpp +++ b/src/psbt.cpp @@ -401,3 +401,11 @@ bool DecodeRawPSBT(PartiallySignedTransaction& psbt, const std::string& tx_data, } return true; } + +uint32_t PartiallySignedTransaction::GetVersion() const +{ + if (m_version != std::nullopt) { + return *m_version; + } + return 0; +} |