Commit graph

138 commits

Author SHA1 Message Date
f840069ecb
update copyright dates 2026-02-11 13:02:12 +00:00
2b7080c227
subprocess.run(): use text arg (10 files) 2025-10-03 10:34:04 +00:00
20734cc7bb
util2: new load_fake_cryptodome() function
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).
2025-09-26 10:40:23 +00:00
4573e170ed
test suite: use match statement where practicable (21 files) 2025-09-23 09:20:53 +00:00
2d01fbc45c
use hashlib keccak256() function if available
Available if Python compiled with OpenSSL 3.2 or greater (Python >= 3.13)
2025-09-23 09:20:53 +00:00
9e62934151
test suite: support ethkey as alternative to eth-keys 2025-09-15 09:28:41 +00:00
89ad0fd29b
keyword-only parameters throughout 2025-03-15 18:24:52 +00:00
e54f039690
update copyright dates 2025-02-16 14:42:27 +00:00
13976084ab
test suite: use eth-keys instead of ethkey 2024-12-30 11:31:39 +00:00
51e456a4e5
improve load_cryptodome() monkey-patch function 2024-12-30 11:31:39 +00:00
74bc49f973
whitespace: tests, top level 2024-10-18 10:32:12 +00:00
5150ca586b
update file header 2024-10-18 10:32:06 +00:00
f6843a3fcd
opts.py: refactor usage(), version(), show_hash_presets() 2024-10-08 12:56:00 +00:00
66521a07f2
update --longhelp text 2024-10-08 12:55:58 +00:00
8edc7da5a2
BCH cashaddr: full support
- 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
2024-09-29 11:59:57 +00:00
eeb98869d3
CoinAddr: add views, view_pref attrs 2024-09-29 11:59:56 +00:00
3b4e9ebc1e
pylint: test suite, examples 2024-09-20 09:36:06 +00:00
b1ad293bae
minor testing fixes 2024-07-06 14:05:53 +00:00
8e46932475
update copyright dates 2024-01-19 11:05:10 +00:00
8c756b0b2a
variable rename: secp256k1_ge -> secp256k1_group_order 2023-12-12 10:19:52 +00:00
4c49a6e59c
launch test and helper scripts with main.launch() 2023-12-12 10:19:51 +00:00
525b54af8e
altcoin.py -> altcoin/params.py, test/altcointest.py 2023-11-30 10:53:40 +00:00
32b3558581
BTC-only testing fixes 2023-11-21 15:48:10 +00:00
d10ae21a2f
util2.py: add load_cryptodomex() function for monero-python 2023-11-14 16:01:42 +00:00
7135744de7
use pycryptodomex instead of pysha3 for keccak_256 function 2023-10-18 12:11:48 +00:00
a7e816f98e
test suite: make test scripts importable as modules 2023-10-13 09:51:14 +00:00
6a21044127
test suite: improve initialization of sys.path and repo_root 2023-10-13 09:51:14 +00:00
cd19f132f9
pylint (test suite) - return from __init__() 2023-10-11 12:58:53 +00:00
2076c0308b
pylint (test suite) - various cleanups 2023-10-11 12:58:53 +00:00
775e596dda
pylint (test suite) - unused variables 2023-10-11 12:58:52 +00:00
033822f565
pylint (test suite) - use "is" for bool,None,type equality 2023-10-11 12:58:52 +00:00
7b32c412d5
pylint (test suite) - imports 2023-10-11 12:58:51 +00:00
b8fb987bb3
pylint (test suite) - inherit from object implicitly 2023-10-11 12:58:51 +00:00
01430166e5
whitespace, comments, docstrings (test suite) 2023-10-11 12:58:51 +00:00
e99950373a
delete mmgen/common.py; import fixes and cleanups throughout (deglob) 2023-10-03 14:27:57 +00:00
f626fc2e05
missing import fixes throughout 2023-10-03 14:27:57 +00:00
31a6e62a24
test suite: sys.path, overlay, PYTHONPATH cleanups 2023-09-26 10:23:40 +00:00
e1f68963a7
use pycryptodome/pycryptodomex for Keccak testing 2023-05-19 16:16:52 +00:00
9e1935ad19
opts.init() -> Config() 2023-04-04 16:04:10 +00:00
93bcc92534
globalvars.py -> cfg.py 2023-04-04 16:04:10 +00:00
c7adb56e38
Config API, Part I
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.
2023-03-28 18:14:37 +00:00
c3ce1ab8e3
globalvars.py: new GlobalConstants (gc), GlobalVars (gv) classes
- 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.
2023-03-28 18:14:36 +00:00
78e882143c
whitespace, cleanups, imports throughout [73 files changed] 2023-03-27 10:49:04 +00:00
1aeefd64ae
update copyright dates 2023-01-03 10:36:07 +00:00
20f4b12832
module docstring cleanups [134 files] 2022-11-14 09:54:07 +00:00
14d40b2b9d
gentest.py: minor fixes, upgrade DASH testing status 2022-10-07 19:48:51 +00:00
4aa9f731c2
test suite: use monero-python as reference tool 2022-10-05 19:22:41 +00:00
1ae19320a8
import key and address generators from addrgen.py 2022-10-04 13:08:55 +00:00
1eabba00a8
add ethkey dependency test 2022-05-06 12:52:40 +00:00
41376eb515
new MMGenSystemExit exception; remove rdie(), ydie() 2022-02-05 13:32:56 +00:00