diff options
| author | Andrew Chow <[email protected]> | 2018-08-13 14:59:31 -0700 |
|---|---|---|
| committer | Andrew Chow <[email protected]> | 2018-08-13 14:59:31 -0700 |
| commit | 43811e63380d803e037de69dc0567aae590fa109 (patch) | |
| tree | a010b191dbd2ba4827a037c197796e618fb00e2d /src/streams.h | |
| parent | Merge #13534: Don't assert(foo()) where foo() has side effects (diff) | |
| download | discoin-43811e63380d803e037de69dc0567aae590fa109.tar.xz discoin-43811e63380d803e037de69dc0567aae590fa109.zip | |
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.
Diffstat (limited to 'src/streams.h')
| -rw-r--r-- | src/streams.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/streams.h b/src/streams.h index 2dcca6646..096ebfc9c 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<typename S> |