Skip to content

Enable CashAddr in all binaries, add -usecashaddr option to bitcoin-tx

The initial value of useCashAddr in GlobalConfig has been changed from false to DEFAULT_USE_CASHADDR, which is true. This means that unless programmed otherwise, every programme now uses CashAddr. This is the first commit of this MR.

Practically, the only binary affected by this change should be bitcoin-tx (bitcoin-cli/bitcoin-seeder don't encode addresses AFAIK, bitcoind/bitcoin-qt already configure useCashAddr explicitly). To give the user control over the bitcoin-tx output format, a new CLI parameter -usecashaddr has been added to bitcoin-tx, similar to the existing parameter in bitcoind/bitcoin-qt. The tests set for bitcoin-tx has been upgraded to CashAddr with -usecashaddr=1 and a new test for -usecashaddr=0 has been added. This is the second commit of this MR.

The default for -usecashaddr in bitcoin-tx is temporarily set to 0, with a warning in release notes and help text that this will be changed to 1 in v0.22.

Test plan:

  1. bitcoin-tx -?
  2. ninja check check-functional (ninja check includes the bitcoin-tx tests)
Edited by BigBlockIfTrue

Merge request reports