|
@@ -59,19 +59,19 @@ rt_data = {
|
|
|
'rtBals_gb': {
|
|
|
'btc': {
|
|
|
'0conf0': {
|
|
|
- 'mmgen': ('283.22339537','0','283.22339537'),
|
|
|
- 'nonmm': ('16.77647763','0','116.77629233'),
|
|
|
- 'total': ('299.999873','0','399.9996877'),
|
|
|
+ 'mmgen': ('283.22339537','283.22339537'),
|
|
|
+ 'nonmm': ('16.77647763','116.77629233'),
|
|
|
+ 'total': ('299.999873','399.9996877'),
|
|
|
},
|
|
|
'0conf1': {
|
|
|
- 'mmgen': ('283.22339537','283.22339537','0'),
|
|
|
- 'nonmm': ('16.77647763','16.77647763','99.9998147'),
|
|
|
- 'total': ('299.999873','299.999873','99.9998147'),
|
|
|
+ 'mmgen': ('283.22339537','0'),
|
|
|
+ 'nonmm': ('16.77647763','99.9998147'),
|
|
|
+ 'total': ('299.999873','99.9998147'),
|
|
|
},
|
|
|
'1conf1': {
|
|
|
- 'mmgen': ('0','0','283.22339537'),
|
|
|
- 'nonmm': ('0','0','116.77629233'),
|
|
|
- 'total': ('0','0','399.9996877'),
|
|
|
+ 'mmgen': ('0','283.22339537'),
|
|
|
+ 'nonmm': ('0','116.77629233'),
|
|
|
+ 'total': ('0','399.9996877'),
|
|
|
},
|
|
|
'1conf2': {
|
|
|
'mmgen': ('0','283.22339537','0'),
|
|
@@ -81,19 +81,19 @@ rt_data = {
|
|
|
},
|
|
|
'bch': {
|
|
|
'0conf0': {
|
|
|
- 'mmgen': ('283.22339437','0','283.22339437'),
|
|
|
- 'nonmm': ('16.77647763','0','116.77637483'),
|
|
|
- 'total': ('299.999872','0','399.9997692'),
|
|
|
+ 'mmgen': ('283.22339437','283.22339437'),
|
|
|
+ 'nonmm': ('16.77647763','116.77637483'),
|
|
|
+ 'total': ('299.999872','399.9997692'),
|
|
|
},
|
|
|
'0conf1': {
|
|
|
- 'mmgen': ('283.22339437','283.22339437','0'),
|
|
|
- 'nonmm': ('16.77647763','16.77647763','99.9998972'),
|
|
|
- 'total': ('299.999872','299.999872','99.9998972'),
|
|
|
+ 'mmgen': ('283.22339437','0'),
|
|
|
+ 'nonmm': ('16.77647763','99.9998972'),
|
|
|
+ 'total': ('299.999872','99.9998972'),
|
|
|
},
|
|
|
'1conf1': {
|
|
|
- 'mmgen': ('0','0','283.22339437'),
|
|
|
- 'nonmm': ('0','0','116.77637483'),
|
|
|
- 'total': ('0','0','399.9997692'),
|
|
|
+ 'mmgen': ('0','283.22339437'),
|
|
|
+ 'nonmm': ('0','116.77637483'),
|
|
|
+ 'total': ('0','399.9997692'),
|
|
|
},
|
|
|
'1conf2': {
|
|
|
'mmgen': ('0','283.22339437','0'),
|
|
@@ -103,19 +103,19 @@ rt_data = {
|
|
|
},
|
|
|
'ltc': {
|
|
|
'0conf0': {
|
|
|
- 'mmgen': ('283.21717237','0','283.21717237'),
|
|
|
- 'nonmm': ('16.77647763','0','5116.77036263'),
|
|
|
- 'total': ('299.99365','0','5399.987535'),
|
|
|
+ 'mmgen': ('283.21717237','283.21717237'),
|
|
|
+ 'nonmm': ('16.77647763','5116.77036263'),
|
|
|
+ 'total': ('299.99365','5399.987535'),
|
|
|
},
|
|
|
'0conf1': {
|
|
|
- 'mmgen': ('283.21717237','283.21717237','0'),
|
|
|
- 'nonmm': ('16.77647763','16.77647763','5099.993885'),
|
|
|
- 'total': ('299.99365','299.99365','5099.993885'),
|
|
|
+ 'mmgen': ('283.21717237','0'),
|
|
|
+ 'nonmm': ('16.77647763','5099.993885'),
|
|
|
+ 'total': ('299.99365','5099.993885'),
|
|
|
},
|
|
|
'1conf1': {
|
|
|
- 'mmgen': ('0','0','283.21717237'),
|
|
|
- 'nonmm': ('0','0','5116.77036263'),
|
|
|
- 'total': ('0','0','5399.987535'),
|
|
|
+ 'mmgen': ('0','283.21717237'),
|
|
|
+ 'nonmm': ('0','5116.77036263'),
|
|
|
+ 'total': ('0','5399.987535'),
|
|
|
},
|
|
|
'1conf2': {
|
|
|
'mmgen': ('0','283.21717237','0'),
|
|
@@ -727,16 +727,21 @@ class TestSuiteRegtest(TestSuiteBase,TestSuiteShared):
|
|
|
return t
|
|
|
|
|
|
def bob_getbalance(self,bals,confs=1):
|
|
|
- for i in (0,1,2):
|
|
|
+ for i in range(len(bals['mmgen'])):
|
|
|
assert Decimal(bals['mmgen'][i]) + Decimal(bals['nonmm'][i]) == Decimal(bals['total'][i])
|
|
|
+ sid = self._user_sid('bob')
|
|
|
t = self.spawn('mmgen-tool',['--bob','getbalance',f'minconf={confs}'])
|
|
|
t.expect('Wallet')
|
|
|
- for k in ('mmgen','nonmm','total'):
|
|
|
- ret = strip_ansi_escapes(t.expect_getend(r'\S+: ',regex=True))
|
|
|
+ for k,lbl in (
|
|
|
+ ('mmgen',f'{sid}:'),
|
|
|
+ ('nonmm','Non-MMGen:'),
|
|
|
+ ('total',f'TOTAL {self.proto.coin}')
|
|
|
+ ):
|
|
|
+ ret = strip_ansi_escapes(t.expect_getend(lbl + ' '))
|
|
|
cmp_or_die(
|
|
|
' '.join(bals[k]),
|
|
|
- re.sub(rf'\s+{self.proto.coin}\s*',' ',ret).strip(),
|
|
|
- desc=k,
|
|
|
+ ' '.join(ret.split()),
|
|
|
+ desc = k,
|
|
|
)
|
|
|
return t
|
|
|
|