aboutsummaryrefslogtreecommitdiff
path: root/src/script/sign.cpp
diff options
context:
space:
mode:
authorAndrew Chow <achow101-github@achow101.com>2018-06-27 16:53:48 -0700
committerAndrew Chow <achow101-github@achow101.com>2018-07-13 14:27:31 -0700
commit41c607f09badb2c3ed58ff6fb17a8ebbef2cdabd (patch)
tree5d64256ce892a04405c5f60962015643135e1bfa /src/script/sign.cpp
parent287e4edc2fd2514a0095273f01fe66b85ce10856 (diff)
Implement PSBT Structures and un/serialization methods per BIP 174
Diffstat (limited to 'src/script/sign.cpp')
-rw-r--r--src/script/sign.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/script/sign.cpp b/src/script/sign.cpp
index 60a8a2655d..afbcb22d18 100644
--- a/src/script/sign.cpp
+++ b/src/script/sign.cpp
@@ -429,3 +429,19 @@ bool IsSolvable(const SigningProvider& provider, const CScript& script)
}
return false;
}
+
+
+bool PartiallySignedTransaction::IsNull() const
+{
+ return !tx && inputs.empty() && outputs.empty() && unknown.empty();
+}
+
+bool PSBTInput::IsNull() const
+{
+ return !non_witness_utxo && witness_utxo.IsNull() && partial_sigs.empty() && unknown.empty() && hd_keypaths.empty() && redeem_script.empty() && witness_script.empty();
+}
+
+bool PSBTOutput::IsNull() const
+{
+ return redeem_script.empty() && witness_script.empty() && hd_keypaths.empty() && unknown.empty();
+}