diff options
| author | Glenn Willen <[email protected]> | 2018-10-26 15:26:16 -0700 |
|---|---|---|
| committer | Pieter Wuille <[email protected]> | 2018-12-03 10:35:34 -0800 |
| commit | 70ee1f8709a54a9aeac004d8589faa08f665587a (patch) | |
| tree | e4354a95bd1d8e8737fb5dd50e11fc3e436308fb /src/script/sign.cpp | |
| parent | Remove redundant txConst parameter to FillPSBT (diff) | |
| download | archived-discoin-70ee1f8709a54a9aeac004d8589faa08f665587a.tar.xz archived-discoin-70ee1f8709a54a9aeac004d8589faa08f665587a.zip | |
New PartiallySignedTransaction constructor from CTransction
New constructor that creates a PartiallySignedTransaction from a
CTransaction, automatically sizing the inputs and outputs vectors for
convenience.
Github-Pull: #14588
Rebased-From: 65166d4cf828909dc4bc49dd68a58103d015f1fd
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 1ab5051ff..190c0bf68 100644 --- a/src/script/sign.cpp +++ b/src/script/sign.cpp @@ -491,6 +491,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(); |