tests: Fix persistent test xmr chain.
This commit is contained in:
		
							parent
							
								
									df732713ac
								
							
						
					
					
						commit
						5a0263ba5e
					
				@ -4116,8 +4116,8 @@ class BasicSwap(BaseApp):
 | 
				
			|||||||
            return
 | 
					            return
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        if bid.debug_ind == DebugTypes.CREATE_INVALID_COIN_B_LOCK:
 | 
					        if bid.debug_ind == DebugTypes.CREATE_INVALID_COIN_B_LOCK:
 | 
				
			||||||
            self.log.debug('XMR bid %s: Debug %d - Reducing lock b txn amount by 10%%.', bid_id.hex(), bid.debug_ind)
 | 
					 | 
				
			||||||
            bid.amount_to -= int(bid.amount_to * 0.1)
 | 
					            bid.amount_to -= int(bid.amount_to * 0.1)
 | 
				
			||||||
 | 
					            self.log.debug('XMR bid %s: Debug %d - Reducing lock b txn amount by 10%% to %s.', bid_id.hex(), bid.debug_ind, ci_to.format_amount(bid.amount_to))
 | 
				
			||||||
            self.logBidEvent(bid, EventLogTypes.DEBUG_TWEAK_APPLIED, 'ind {}'.format(bid.debug_ind), session)
 | 
					            self.logBidEvent(bid, EventLogTypes.DEBUG_TWEAK_APPLIED, 'ind {}'.format(bid.debug_ind), session)
 | 
				
			||||||
        try:
 | 
					        try:
 | 
				
			||||||
            b_lock_tx_id = ci_to.publishBLockTx(xmr_swap.pkbv, xmr_swap.pkbs, bid.amount_to, xmr_offer.b_fee_rate)
 | 
					            b_lock_tx_id = ci_to.publishBLockTx(xmr_swap.pkbv, xmr_swap.pkbs, bid.amount_to, xmr_offer.b_fee_rate)
 | 
				
			||||||
 | 
				
			|||||||
@ -250,11 +250,11 @@ class Test(unittest.TestCase):
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
        wallets = json.loads(urlopen('http://127.0.0.1:{}/json/wallets'.format(UI_PORT + 1)).read())
 | 
					        wallets = json.loads(urlopen('http://127.0.0.1:{}/json/wallets'.format(UI_PORT + 1)).read())
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        xmr_addr1 = wallets['6']['deposit_address']
 | 
					        self.xmr_addr = wallets['6']['deposit_address']
 | 
				
			||||||
        num_blocks = 100
 | 
					        num_blocks = 100
 | 
				
			||||||
        if callrpc_xmr_na(XMR_BASE_RPC_PORT + 1, 'get_block_count')['count'] < num_blocks:
 | 
					        if callrpc_xmr_na(XMR_BASE_RPC_PORT + 1, 'get_block_count')['count'] < num_blocks:
 | 
				
			||||||
            logging.info('Mining {} Monero blocks to {}.'.format(num_blocks, xmr_addr1))
 | 
					            logging.info('Mining {} Monero blocks to {}.'.format(num_blocks, self.xmr_addr))
 | 
				
			||||||
            callrpc_xmr_na(XMR_BASE_RPC_PORT + 1, 'generateblocks', {'wallet_address': xmr_addr1, 'amount_of_blocks': num_blocks})
 | 
					            callrpc_xmr_na(XMR_BASE_RPC_PORT + 1, 'generateblocks', {'wallet_address': self.xmr_addr, 'amount_of_blocks': num_blocks})
 | 
				
			||||||
        logging.info('XMR blocks: %d', callrpc_xmr_na(XMR_BASE_RPC_PORT + 1, 'get_block_count')['count'])
 | 
					        logging.info('XMR blocks: %d', callrpc_xmr_na(XMR_BASE_RPC_PORT + 1, 'get_block_count')['count'])
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        self.btc_addr = callbtcrpc(0, 'getnewaddress', ['mining_addr', 'bech32'])
 | 
					        self.btc_addr = callbtcrpc(0, 'getnewaddress', ['mining_addr', 'bech32'])
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
		Reference in New Issue
	
	Block a user