mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-19 15:14:23 +01:00
elements: Use chainparams when the test relies on addresses
We were checking against hardcoded hrp and prefixes. Now we parametrize via the chainparams. Signed-off-by: Christian Decker <decker.christian@gmail.com>
This commit is contained in:
committed by
Rusty Russell
parent
84144bcef6
commit
67fc8ffbcf
@@ -387,6 +387,9 @@ class BitcoinD(TailableProc):
|
||||
self.wait_for_log(r'UpdateTip: new best=.* height={}'.format(final_len))
|
||||
return hashes
|
||||
|
||||
def getnewaddress(self):
|
||||
return self.rpc.getnewaddress()
|
||||
|
||||
|
||||
class ElementsD(BitcoinD):
|
||||
def __init__(self, bitcoin_dir="/tmp/bitcoind-test", rpcport=None):
|
||||
@@ -426,6 +429,13 @@ class ElementsD(BitcoinD):
|
||||
# As of 0.16, generate() is removed; use generatetoaddress.
|
||||
return self.rpc.generate(numblocks)
|
||||
|
||||
def getnewaddress(self):
|
||||
"""Need to get an address and then make it unconfidential
|
||||
"""
|
||||
addr = self.rpc.getnewaddress()
|
||||
info = self.rpc.getaddressinfo(addr)
|
||||
return info['unconfidential']
|
||||
|
||||
|
||||
class LightningD(TailableProc):
|
||||
def __init__(self, lightning_dir, bitcoindproxy, port=9735, random_hsm=False, node_id=0):
|
||||
|
||||
Reference in New Issue
Block a user