forked from LBRYCommunity/lbry-sdk
get better error on RPC failure
This commit is contained in:
parent
a10eb30771
commit
07d584133e
2 changed files with 9 additions and 6 deletions
|
@ -591,9 +591,12 @@ class LBCWalletNode:
|
|||
*cmnd_args, stdout=subprocess.PIPE, stderr=subprocess.PIPE
|
||||
)
|
||||
out, err = await process.communicate()
|
||||
if err and b'creating a default config file' not in err:
|
||||
log.warning(err)
|
||||
result = out.decode().strip()
|
||||
err = err.decode().strip()
|
||||
if len(result) <= 0 and err.startswith('-'):
|
||||
raise Exception(err)
|
||||
if err and 'creating a default config file' not in err:
|
||||
log.warning(err)
|
||||
self.log.info(result)
|
||||
if result.startswith('error code'):
|
||||
raise Exception(result)
|
||||
|
|
|
@ -61,10 +61,10 @@ class TestSegwit(CommandTestCase):
|
|||
bech32_address3 = await self.blockchain.get_new_address(self.blockchain.BECH32_ADDRESS)
|
||||
|
||||
# fund specific addresses for later use
|
||||
p2sh_txid1 = await self.send_to_address_and_wait(p2sh_address1, '1.0')
|
||||
p2sh_txid2 = await self.send_to_address_and_wait(p2sh_address2, '1.0')
|
||||
bech32_txid1 = await self.send_to_address_and_wait(bech32_address1, '1.0')
|
||||
bech32_txid2 = await self.send_to_address_and_wait(bech32_address2, '1.0')
|
||||
p2sh_txid1 = await self.blockchain.send_to_address(p2sh_address1, '1.0')
|
||||
p2sh_txid2 = await self.blockchain.send_to_address(p2sh_address2, '1.0')
|
||||
bech32_txid1 = await self.blockchain.send_to_address(bech32_address1, '1.0')
|
||||
bech32_txid2 = await self.blockchain.send_to_address(bech32_address2, '1.0')
|
||||
await self.generate(1)
|
||||
|
||||
# P2SH & BECH32 can pay to P2SH address
|
||||
|
|
Loading…
Reference in a new issue