1
0
Fork 0
mirror of https://github.com/bitcoin/bips.git synced 2025-02-23 23:27:22 +01:00

Require creator to initialize empty output fields

The current version of the spec requires creator role to initialize empty input fields, but says nothing about output field initialization. At the same time, the following role, updater, "should also add redeemScripts, witnessScripts, and BIP 32 derivation paths to the input and output data if it knows them.", which does not make any sense if the fields were uninitialized. The [current Bitcoin Core implementation does this](a24806c25d/src/psbt.cpp (L12)), and [other PSBT implementations, like rust-bitcoin, follow this practice](https://github.com/rust-bitcoin/rust-bitcoin/blob/master/src/util/psbt/mod.rs#L59)
This commit is contained in:
Dr. Maxim Orlovsky 2020-09-07 13:06:43 +02:00 committed by GitHub
parent bdb297a7c8
commit 3d297861eb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -357,7 +357,7 @@ Using the transaction format involves many different responsibilities. Multiple
===Creator===
The Creator creates a new PSBT. It must create an unsigned transaction and place it in the PSBT.
The Creator must create empty input fields.
The Creator must create empty input and output fields fields.
===Updater===