diff options
| author | Glenn Willen <[email protected]> | 2018-10-26 15:26:16 -0700 |
|---|---|---|
| committer | Glenn Willen <[email protected]> | 2018-11-01 12:11:24 -0700 |
| commit | 65166d4cf828909dc4bc49dd68a58103d015f1fd (patch) | |
| tree | c72e82590f9a56617085336e41010b74d25586dd /src/script/sign.cpp | |
| parent | Remove redundant txConst parameter to FillPSBT (diff) | |
| download | discoin-65166d4cf828909dc4bc49dd68a58103d015f1fd.tar.xz discoin-65166d4cf828909dc4bc49dd68a58103d015f1fd.zip | |
New PartiallySignedTransaction constructor from CTransction
New constructor that creates a PartiallySignedTransaction from a
CTransaction, automatically sizing the inputs and outputs vectors for
convenience.
Diffstat (limited to 'src/script/sign.cpp')
| -rw-r--r-- | src/script/sign.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/script/sign.cpp b/src/script/sign.cpp index 89cc7c808..bcf110896 100644 --- a/src/script/sign.cpp +++ b/src/script/sign.cpp @@ -513,6 +513,12 @@ bool IsSolvable(const SigningProvider& provider, const CScript& script) return false; } +PartiallySignedTransaction::PartiallySignedTransaction(const CTransaction& tx) : tx(tx) +{ + inputs.resize(tx.vin.size()); + outputs.resize(tx.vout.size()); +} + bool PartiallySignedTransaction::IsNull() const { return !tx && inputs.empty() && outputs.empty() && unknown.empty(); |