Commit graph

9 commits

Author SHA1 Message Date
f9e6d994f0
whitespace: test/misc 2024-10-18 10:32:13 +00:00
aff850d1c8
test suite: import cleanups 2023-10-03 14:27:57 +00:00
9e1935ad19
opts.init() -> Config() 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
19f0730913
crypto.py: reimplement as class 2023-03-27 10:50:38 +00:00
9888fe4c65
util.py: relocate lesser-used functions to util2.py 2022-10-17 18:37:22 +00:00
3fa644b35b
remove two more assert statements with side-effects
- these were overlooked in e7d531db0
- scripts now run with PYTHONOPTIMIZE=1, though this should never be set
  in a production environment
2022-01-19 11:43:51 +00:00
7e2ef3a059
subclass pwfile_reuse_warning from oneshot_warning 2021-09-04 18:34:09 +00:00
7be1114f3b
new oneshot_warning_group class 2021-09-03 20:17:24 +00:00