lbcutil/psbt
Oliver Gugger 04442f8ef9
psbt: fix deserialization with zero inputs
This is a fix/workaround for a special case that's caused by
https://github.com/btcsuite/btcd/blob/master/wire/msgtx.go#L426.
When a wire format transaction with no inputs is serialized, the wire
package assumes it's a non-witness transaction (as there is indeed no
witness data present).
But when de-serializing the same transaction, the line mentioned above
assumes that for the special case of a zero input length, the
transaction must be in the witness format, which causes the
de-serialization  to fail.
The workaround in this commit fixes this special case by just trying
to deserialize the transaction in the non-witness format too.
2020-03-23 10:38:36 +01:00
..
bip32.go psbt: move bip32 structs into new file 2020-01-15 17:56:32 -08:00
creator.go psbt: remove Creator struct, create New function as entry point into package 2020-01-15 17:56:35 -08:00
extractor.go psbt: modify Extract method to return the transaction directly 2020-01-15 17:56:38 -08:00
finalizer.go psbt: create new utils file, refactor finalizer for consistent code style 2020-01-15 17:56:41 -08:00
go.mod psbt: create sub-module 2020-01-15 17:57:05 -08:00
go.sum psbt: create sub-module 2020-01-15 17:57:05 -08:00
partial_input.go psbt: move input into new file 2020-01-15 17:56:26 -08:00
partial_output.go psbt: move output into new file 2020-01-15 17:56:29 -08:00
partialsig.go psbt: create new utils file, refactor finalizer for consistent code style 2020-01-15 17:56:41 -08:00
psbt.go psbt: fix deserialization with zero inputs 2020-03-23 10:38:36 +01:00
psbt_test.go psbt: fix deserialization with zero inputs 2020-03-23 10:38:36 +01:00
signer.go psbt: create new enum type for return values of Sign method 2020-01-15 17:56:47 -08:00
types.go psbt: move PSBT keys/type into new file 2020-01-15 17:56:23 -08:00
updater.go psbt: refactor updater.go for consistent code style 2020-01-15 17:56:50 -08:00
utils.go psbt: create new utils file, refactor finalizer for consistent code style 2020-01-15 17:56:41 -08:00