Commit graph

11 commits

Author SHA1 Message Date
1a896d9af9
update copyright dates 2022-01-04 19:51:22 +00:00
6692a43d59
f-strings, whitespace (test files) [44 files patched] 2021-09-29 21:17:57 +00:00
cb7f38370b
Update copyright dates 2021-02-19 20:09:06 +03:00
c3f185e8b0
eliminate use of global vars g.proto, g.coin, g.rpc and others
This patch eliminates nearly all the global variables that changed during the
execution of scripts.  With a few minor exceptions, global vars are now used
only during initialization or reserved for cfg file / cmdline options and other
unchanging values.

The result is a code base that's much more maintainable and extensible and less
error-prone.  The autosigning code, which supports signing of transactions for
multiple protocols and networks, has been greatly simplified.

Doing away with globals required many changes throughout the code base, and
other related (and not so related) changes and cleanups were made along the
way, resulting in an enormous patch.

Additional code changes include:

    - tx.py: complete reorganization of TX classes and use of nesting

    - protocol.py: separation of Regtest and Testnet into distinct subclasses
      with separate address and transaction files and file extensions

    - new module help.py for the help notes, loaded on demand

    - addr.py: rewrite of the address file label parsing code

    - tx.py,tw.py: use of generators to create formatted text

User-visible changes include:

    - importing of addresses for tokens not yet in the user's tracking wallet
      is now performed with the `--token-addr` option instead of `--token`

Testing:

    Testing this patch requires a full run of the test suite as described on the
    Test-Suite wiki page.
2020-05-28 09:53:34 +00:00
43432327c7
global change: init_coin() -> g.proto = init_proto() 2020-05-16 12:44:43 +00:00
31f7236731
protocol.py: new coin protocol instance attrs
- add 'testnet', 'regtest' and 'dcoin' attributes to coin protocol instance,
  remove is_testnet() method

- g.testnet -> g.proto.testnet, g.regtest -> g.proto.regtest

- g.coin and g.dcoin are now read-only properties shadowing g.proto.coin
  and g.proto.dcoin, respectively
2020-05-16 09:27:13 +00:00
f297645796
ImmutableAttr,ListItemAttr: renamed, call signature simplified 2020-04-08 14:13:13 +00:00
673b97b3b8
update copyright dates 2020-02-18 14:07:27 +00:00
4d23f122aa
add g.network convenience variable 2019-11-04 16:47:21 +00:00
174caeebd3
MMGenImmutableAttr: allow callable dtype arg, remove 'no_type_check' option 2019-10-19 20:27:24 +03:00
3224b9c7d2
new test: objattrtest.py: test objects' immutable attributes 2019-10-19 18:22:31 +03:00