- all options without parameters may be negated by prefixing the option name
with ‘no-’
- if the option name itself begins with ‘no-’, then the option is negated
by removing the ‘no-’ prefix
- negation may be used to override options set in the cfg file
- command-line options may also be overridden, with the last-listed option
taking precedence
- as with ordinary options, substring matching is supported
Examples:
OPTION NEGATED OPTION
--no-license --license
--no-license --lic
--quiet --no-quiet
--quiet --no-q
Testing:
$ test/cmdtest.py opts cfgfile
- do strict type checking in initializer, forbid double initialization
- add dynamic decimal precision based on protocol
- dunder method fixes, cleanups
- JSON-RPC library now returns floats (i.e. amounts) as strings instead of Decimal,
eliminating an extra conversion step
- the new format is plain JSON, readable with tools such as `jq`. Filenames
and extensions for raw, signed and sent transactions remain unchanged
- reading/writing the legacy format continues to be supported, but new
transactions cannot be written to it. This means users who upgrade MMGen
Wallet to this commit on their online computer(s) must upgrade it on their
offline signing device(s) as well: upgraded offline installations can
interoperate with non-upgraded online installations, but not vice-versa
- no additional action is required: this change is transparent to the user
Testing:
$ test/unit_tests.py tx.txfile
$ test/cmdtest.py -n main
$ test/test-release.sh -A autosign
- command-line options are now parsed natively, without use of the getopt module
- global options and --longhelp helpscreen are now contextual, depending on coin
and executed command
- commands invoked with out-of-context global options (e.g. `mmgen-walletgen
--coin=btc`) now fail with an ‘unrecognized option’ error
Testing:
$ test/test-release.sh help
$ test/cmdtest.py opts