Skip to content

Commit 3d29786

Browse files
authored
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](https://github.com/bitcoin/bitcoin/blob/a24806c25d7a81a9c436de58eb5778d93abab16b/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)
1 parent bdb297a commit 3d29786

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

bip-0174.mediawiki

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -357,7 +357,7 @@ Using the transaction format involves many different responsibilities. Multiple
357357
===Creator===
358358

359359
The Creator creates a new PSBT. It must create an unsigned transaction and place it in the PSBT.
360-
The Creator must create empty input fields.
360+
The Creator must create empty input and output fields fields.
361361

362362
===Updater===
363363

0 commit comments

Comments
 (0)