The eth-key and monero-python packages used in the test suite require the
keccak256() function provided by the pycryptodome (pycryptodomex) package.
pycryptodome is used in the MMGen code base only by these packages, and only for
testing.
This monkey-patch function eliminates dependency on pycryptodome on systems that
provide keccak256() via hashlib (>=OpenSSL 3.2, >=Python 3.13, latest MSYS2).
- BCH addresses are now displayed in cashaddr format by default. This may be
overridden on the command line with --cashaddr=0, or in the config file by
setting `bch_cashaddr` to false
- In tracking wallet views, the ‘h’ key toggles between legacy and cashaddr
address display
- Transaction views display BCH addresses in both formats simultaneously
- The --usecashaddr=0 daemon option is no longer required and should be omitted
Testing:
$ test/unit_tests.py -v cashaddr bip_hd.multicoin
$ test/gentest.py --coin=bch -v --type=C 1 test/ref/bitcoin_cash/bchwallet.dump
$ test/cmdtest.py -e bch_txview_cashaddr1 bch_txview_cashaddr2
$ test/cmdtest.py --coin=bch -e txsend regtest.view autosign_automount
$ test/cmdtest.py --coin=bch -n ref3_addr
This patch eliminates the global configuration variables `opt` and `g`, making
all functions and class instances locally configurable. Configuration data is
passed to functions and constructors via the `cfg` parameter and made available
to methods in `self.cfg`.
Local configuration free from dependence on the command line will enable the
creation of multiple, independently configured instances of MMGen’s data
objects within a single process.
Potential applications include testing (tracking wallets configured to interact
with spawned processes, for example) and the use of MMGen as a library for
other projects.
This patch completes most of the work required to enable the API. The full
implementation will appear in a forthcoming commit.
- The attributes of GlobalConstants are non-configurable. They’re constant
for a given machine, user, executable and MMGen release.
- The attributes of GlobalVars, `stderr` and `stdout`, are used by the test
suite to redirect msg() and friends to /dev/null.
- All the aforementioned attributes formerly belonged to GlobalConfig.