Browse Source

update for MMGen Wallet 15.1.dev3

The MMGen Project 1 month ago
parent
commit
cb42eaa8cd

+ 1 - 1
mmgen_node_tools/data/version

@@ -1 +1 @@
-3.5.dev1
+3.5.dev2

+ 1 - 1
mmgen_node_tools/main_ticker.py

@@ -234,7 +234,7 @@ from mmgen.util import fmt_list,fmt_dict
 from mmgen.cfg import Config
 from . import Ticker
 
-gcfg = Config( opts_data=opts_data, do_post_init=True )
+gcfg = Config(opts_data=opts_data, caller_post_init=True)
 
 Ticker.make_cfg(gcfg)
 

+ 1 - 1
setup.cfg

@@ -38,7 +38,7 @@ python_requires = >=3.9
 include_package_data = True
 
 install_requires =
-	mmgen-wallet>=15.1.dev1
+	mmgen-wallet>=15.1.dev3
 	pyyaml
 	yahooquery
 

+ 1 - 1
test/cmdtest_py_d/ct_misc.py

@@ -50,7 +50,7 @@ class CmdTestHelp(CmdTestBase):
 		return t
 
 	def longhelpscreens(self):
-		return self.helpscreens(arg='--longhelp',expect='USAGE:.*LONG OPTIONS:')
+		return self.helpscreens(arg='--longhelp',expect='USAGE:.*GLOBAL OPTIONS:')
 
 class CmdTestScripts(CmdTestBase):
 	'scripts not requiring a coin daemon'

+ 49 - 44
test/cmdtest_py_d/ct_regtest.py

@@ -35,7 +35,6 @@ class CmdTestRegtest(CmdTestBase):
 	'various operations via regtest mode'
 	networks = ('btc','ltc','bch')
 	passthru_opts = ('coin',)
-	extra_spawn_args = ['--regtest=1']
 	tmpdir_nums = [1]
 	color = True
 	deterministic = False
@@ -177,57 +176,57 @@ class CmdTestRegtest(CmdTestBase):
 	def sendto2(self): return self.sendto(self.addrs[0],'0.234')
 	def sendto3(self): return self.sendto(self.addrs[1],'0.345')
 
-	def addrbal(self,args,expect_list):
-		t = self.spawn('mmnode-addrbal',args)
+	def addrbal(self, args, expect_list):
+		t = self.spawn('mmnode-addrbal', args2 + args)
 		t.match_expect_list(expect_list)
 		return t
 
 	def addrbal_single(self):
 		return self.addrbal(
-			args2 + [self.addrs[0]],
+			[self.addrs[0]],
 			[
 				f'Balance: 0.357 {cfg.coin}',
 				'2 unspent outputs in 2 blocks',
-				'394','0.123',
-				'395','0.234'
+				'394', '0.123',
+				'395', '0.234'
 			])
 
 	def addrbal_multiple(self):
 		return self.addrbal(
-			args2 + [self.addrs[1],self.addrs[0]],
+			[self.addrs[1], self.addrs[0]],
 			[
-				'396','0.345',
-				'394','0.123',
-				'395','0.234'
+				'396', '0.345',
+				'394', '0.123',
+				'395', '0.234'
 			])
 
 	def addrbal_multiple_tabular1(self):
 		return self.addrbal(
-			args2 + ['--tabular',self.addrs[1],self.addrs[0]],
+			['--tabular', self.addrs[1], self.addrs[0]],
 			[
-				self.addrs[1] + ' 1 396','0.345',
-				self.addrs[0] + ' 2 395','0.357'
+				self.addrs[1] + ' 1 396', '0.345',
+				self.addrs[0] + ' 2 395', '0.357'
 			])
 
 	def addrbal_multiple_tabular2(self):
 		return self.addrbal(
-			args2 + ['--tabular','--first-block',self.addrs[1],self.addrs[0]],
+			['--tabular', '--first-block', self.addrs[1], self.addrs[0]],
 			[
-				self.addrs[1] + ' 1 396','396','0.345',
-				self.addrs[0] + ' 2 394','395','0.357'
+				self.addrs[1] + ' 1 396', '396', '0.345',
+				self.addrs[0] + ' 2 394', '395', '0.357'
 			])
 
 	def addrbal_nobal1(self):
 		return self.addrbal(
-			args2 + [self.addrs[2]], ['Address has no balance'] )
+			[self.addrs[2]], ['Address has no balance'])
 
 	def addrbal_nobal2(self):
 		return self.addrbal(
-			args2 + [self.addrs[2],self.addrs[3]], ['Addresses have no balances'] )
+			[self.addrs[2], self.addrs[3]], ['Addresses have no balances'])
 
 	def addrbal_nobal3(self):
 		return self.addrbal(
-			args2 + [self.addrs[4],self.addrs[0],self.addrs[3]],
+			[self.addrs[4], self.addrs[0], self.addrs[3]],
 			[
 				'No balance',
 				'2 unspent outputs in 2 blocks',
@@ -237,7 +236,7 @@ class CmdTestRegtest(CmdTestBase):
 
 	def addrbal_nobal3_tabular1(self):
 		return self.addrbal(
-			args2 + ['--tabular',self.addrs[4],self.addrs[0],self.addrs[3]],
+			['--tabular', self.addrs[4], self.addrs[0], self.addrs[3]],
 			[
 				self.addrs[4] + ' - - -',
 				self.addrs[0] + ' 2 395','0.357',
@@ -246,7 +245,7 @@ class CmdTestRegtest(CmdTestBase):
 
 	def addrbal_nobal3_tabular2(self):
 		return self.addrbal(
-			args2 + ['--tabular','--first-block',self.addrs[4],self.addrs[0],self.addrs[3]],
+			['--tabular', '--first-block', self.addrs[4], self.addrs[0], self.addrs[3]],
 			[
 				self.addrs[4] + ' - - - -',
 				self.addrs[0] + ' 2 394','395','0.357',
@@ -254,39 +253,45 @@ class CmdTestRegtest(CmdTestBase):
 			])
 
 	def blocks_info(self,args,expect_list):
-		t = self.spawn('mmnode-blocks-info',args)
+		t = self.spawn('mmnode-blocks-info', args1 + args)
 		t.match_expect_list(expect_list)
 		return t
 
 	def blocks_info1(self):
-		return self.blocks_info( args1 + ['--help'], ['USAGE:','OPTIONS:'])
+		return self.blocks_info(
+			['--help'],
+			['USAGE:','OPTIONS:'])
 
 	def blocks_info2(self):
-		return self.blocks_info( args1, [
-			'Current height: 396',
-		])
+		return self.blocks_info(
+			[],
+			['Current height: 396'])
 
 	def blocks_info3(self):
-		return self.blocks_info( args1 + ['+100'], [
-			'Range: 297-396',
-			'Current height: 396',
-			'Next diff adjust: 2016'
-		])
+		return self.blocks_info(
+			['+100'],
+			[
+				'Range: 297-396',
+				'Current height: 396',
+				'Next diff adjust: 2016'
+			])
 
 	def blocks_info4(self):
 		n1,i1,o1,n2,i2,o2 = (2,1,3,6,3,9) if cfg.coin == 'BCH' else (2,1,4,6,3,12)
-		return self.blocks_info( args1 + ['--miner-info','--fields=all','--stats=all','+3'], [
-			'Averages',
-			f'nTx: {n1}',
-			f'Inputs: {i1}',
-			f'Outputs: {o1}',
-			'Totals',
-			f'nTx: {n2}',
-			f'Inputs: {i2}',
-			f'Outputs: {o2}',
-			'Current height: 396',
-			'Next diff adjust: 2016'
-		])
+		return self.blocks_info(
+			['--miner-info', '--fields=all', '--stats=all', '+3'],
+			[
+				'Averages',
+				f'nTx: {n1}',
+				f'Inputs: {i1}',
+				f'Outputs: {o1}',
+				'Totals',
+				f'nTx: {n2}',
+				f'Inputs: {i2}',
+				f'Outputs: {o2}',
+				'Current height: 396',
+				'Next diff adjust: 2016'
+			])
 
 	async def feeview_setup(self):
 
@@ -380,7 +385,7 @@ class CmdTestRegtest(CmdTestBase):
 		return 'ok'
 
 	def _feeview(self,args,expect_list=[]):
-		t = self.spawn('mmnode-feeview',args)
+		t = self.spawn('mmnode-feeview', args1 + args)
 		if expect_list:
 			t.match_expect_list(expect_list)
 		return t