ElementsProject / elements

Open Source implementation of advanced blockchain features extending the Bitcoin protocol
MIT License
1.04k stars 369 forks source link

issueasset creates P2PKH addresses, it would be better to issue to P2WPKH #824

Closed dgpv closed 4 years ago

dgpv commented 4 years ago

issueasset uses PKHash(newKey.GetID()). It would be more convenient if it created segwit addresses, so that transactions that spend newly-created assets can have deterministic txid that won't change after signing the tx

https://github.com/ElementsProject/elements/blob/e5ab941489c564cd78845658b8e8688dc56817f5/src/wallet/rpcwallet.cpp#L6238-L6253

instagibbs commented 4 years ago

argh good catch. Ideally this output is chosen based on wallet defaults.

instagibbs commented 4 years ago

our hand will be forced with descriptor wallets by ~0.21

stevenroose commented 4 years ago

Closing this through #825. Gonna create a separate issue for using wallet default.