Version bump; minor changes, fixes

This commit is contained in:
The MMGen Project 2020-07-29 14:39:32 +00:00
commit ab61896647
Signed by: mmgen
GPG key ID: 3F8B1861E32B7DA2
4 changed files with 18 additions and 14 deletions

View file

@ -17,8 +17,7 @@
# this program. If not, see <http://www.gnu.org/licenses/>.
"""
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

View file

@ -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())

View file

@ -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'

View file

@ -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: