-
Notifications
You must be signed in to change notification settings - Fork 291
Description
I haven't tested this, just going off rust-bitcoin's deserialization code. rust-bitcoin seems to reject the segwit ambiguity cases around zero-input as otherwise you have to resort to some heuristic to determine how to de-serialize such transactions (and maybe Do The Wrong Thing). This is fine in most cases, and because rust-bitcoin does the sane thing of including the segwit magic byte for zero-input transactions this isn't an issue for other sane segwit-only implementations. Except that when Bitcoin Core is returning a 0-input transaction it doesn't do this for backwards compatibility reasons. I think rust-bitcoincore-rpc should work around this at a higher level, looking at calls like createrawtransaction
and checking the input count to determine how the transaction should be deserialized.