From ab6189664799d6bde8a267387e23e6f4e11d15af Mon Sep 17 00:00:00 2001 From: The MMGen Project Date: Wed, 29 Jul 2020 14:39:32 +0000 Subject: [PATCH] Version bump; minor changes, fixes --- cmds/mmgen-walletchk | 3 +-- examples/halving-calculator.py | 20 +++++++++++--------- mmgen/globalvars.py | 4 ++-- mmgen/protocol.py | 5 ++++- 4 files changed, 18 insertions(+), 14 deletions(-) diff --git a/cmds/mmgen-walletchk b/cmds/mmgen-walletchk index deaf9ae1..d753ac67 100755 --- a/cmds/mmgen-walletchk +++ b/cmds/mmgen-walletchk @@ -17,8 +17,7 @@ # this program. If not, see . """ -mmgen-walletchk: Check integrity of an MMGen deterministic wallet, display - information about it and export it to various formats +mmgen-walletchk: Check integrity of an MMGen deterministic wallet """ from mmgen.main import launch diff --git a/examples/halving-calculator.py b/examples/halving-calculator.py index bf757fd6..15865437 100755 --- a/examples/halving-calculator.py +++ b/examples/halving-calculator.py @@ -60,15 +60,17 @@ async def main(): bdr = (cur['time'] - old['time']) / sample_size t_rem = remaining * int(bdr) - sub = cur['subsidy'] * Decimal('0.00000001') + sub = cur['subsidy'] * proto.coin_amt.min_coin_unit - print(f'Current block: {tip}') - print(f'Next halving block: {tip + remaining}') - print(f'Blocks until halving: {remaining}') - print('Current block subsidy: {} {}'.format(str(sub).rstrip('0'),proto.coin)) - print(f'Current block discovery rate (over last {sample_size} blocks): {bdr/60:0.1f} minutes') - print(f'Current clock time (UTC): {date(clock_time)}') - print(f'Est. halving date (UTC): {date(cur["time"] + t_rem)}') - print(f'Est. time until halving: {dhms(cur["time"] + t_rem - clock_time)}') + print( + f'Current block: {tip}\n' + f'Next halving block: {tip + remaining}\n' + f'Blocks until halving: {remaining}\n' + f'Current block subsidy: {str(sub).rstrip("0")} {proto.coin}\n' + f'Current block discovery rate (over last {sample_size} blocks): {bdr/60:0.1f} minutes\n' + f'Current clock time (UTC): {date(clock_time)}\n' + f'Est. halving date (UTC): {date(cur["time"] + t_rem)}\n' + f'Est. time until halving: {dhms(cur["time"] + t_rem - clock_time)}\n' + ) run_session(main()) diff --git a/mmgen/globalvars.py b/mmgen/globalvars.py index 1490a44e..c3d0c716 100755 --- a/mmgen/globalvars.py +++ b/mmgen/globalvars.py @@ -45,8 +45,8 @@ class GlobalContext(Lockable): _use_class_attr = True # Constants: - version = '0.12.1' - release_date = 'June 2020' + version = '0.12.199' + release_date = 'July 2020' proj_name = 'MMGen' proj_url = 'https://github.com/mmgen/mmgen' diff --git a/mmgen/protocol.py b/mmgen/protocol.py index dd45b0dc..fe60e710 100755 --- a/mmgen/protocol.py +++ b/mmgen/protocol.py @@ -227,6 +227,7 @@ class CoinProtocol(MMGenObject): sign_mode = 'daemon' avg_bdi = int(9.7 * 60) # average block discovery interval (historical) halving_interval = 210000 + max_halvings = 64 def hex2wif(self,hexpriv,pubkey_type,compressed): # input is preprocessed hex sec = bytes.fromhex(hexpriv) @@ -298,6 +299,7 @@ class CoinProtocol(MMGenObject): class BitcoinRegtest(BitcoinTestnet): bech32_hrp = 'bcrt' + halving_interval = 150 class BitcoinCash(Bitcoin): is_fork_of = 'Bitcoin' @@ -353,7 +355,8 @@ class CoinProtocol(MMGenObject): bech32_hrp = 'tltc' class LitecoinRegtest(LitecoinTestnet): - bech32_hrp = 'rltc' + bech32_hrp = 'rltc' + halving_interval = 150 class DummyWIF: