Browse Source

Minor changes

The MMGen Project 4 years ago
parent
commit
15876f4e37
3 changed files with 7 additions and 1 deletions
  1. 3 0
      examples/halving-calculator.py
  2. 2 1
      mmgen/protocol.py
  3. 2 0
      mmgen/tw.py

+ 3 - 0
examples/halving-calculator.py

@@ -22,6 +22,9 @@ Requires a running coin daemon
 Specify coin with --coin=btc (default)/--coin=bch/--coin=ltc
 If necessary, invoke with --rpc-host/--rpc-port/--rpc-user/--rpc-password
 Specify aiohttp backend with --rpc-backend=aiohttp (Linux only)
+
+A more full-featured version of this program can be found in the
+mmgen-node-tools repository.
 """
 	}
 })

+ 2 - 1
mmgen/protocol.py

@@ -228,6 +228,7 @@ class CoinProtocol(MMGenObject):
 		avg_bdi         = int(9.7 * 60) # average block discovery interval (historical)
 		halving_interval = 210000
 		max_halvings    = 64
+		start_subsidy   = 50
 
 		def hex2wif(self,hexpriv,pubkey_type,compressed): # input is preprocessed hex
 			sec = bytes.fromhex(hexpriv)
@@ -321,7 +322,7 @@ class CoinProtocol(MMGenObject):
 		wif_ver_num    = { 'std': 'ef' }
 
 	class BitcoinCashRegtest(BitcoinCashTestnet):
-		pass
+		halving_interval = 150
 
 	class B2X(Bitcoin):
 		is_fork_of      = 'Bitcoin'

+ 2 - 0
mmgen/tw.py

@@ -418,6 +418,8 @@ Actions: [q]uit view, [p]rint to file, pager [v]iew, [w]ide view, add [l]abel:
 				msg(f'Choice must be a single number between 1 and {len(self.unspent)}')
 			else:
 				if action == 'a_lbl_add':
+					cur_lbl = self.unspent[n-1].label
+					msg('Current label: {}'.format(cur_lbl.hl() if cur_lbl else '(none)'))
 					while True:
 						s = my_raw_input("Enter label text (or 'q' to return to main menu): ")
 						if s == 'q':