From 8c4cd2bd895fe7467307867fefc3cd45a685367c Mon Sep 17 00:00:00 2001 From: Andrew Chow Date: Mon, 13 Aug 2018 14:59:31 -0700 Subject: Fix PSBT deserialization of 0-input transactions 0-input transactions can be ambiguously deserialized as being witness transactions. Since the unsigned transaction is never serialized as a witness transaction as it has no witnesses, we should always deserialize it as a non-witness transaction and set the serialization flags as such. Also always serialize the unsigned transaction as a non-witness transaction. GitHub-Pull: #13960 Rebased-From: 43811e6 --- src/streams.h | 1 + 1 file changed, 1 insertion(+) (limited to 'src/streams.h') diff --git a/src/streams.h b/src/streams.h index 2dcca6646d..096ebfc9c2 100644 --- a/src/streams.h +++ b/src/streams.h @@ -61,6 +61,7 @@ public: int GetVersion() const { return nVersion; } int GetType() const { return nType; } + size_t size() const { return stream->size(); } }; template -- cgit v1.2.3