Skip to content

Commit

Permalink
elementsd: Do not use generate for elementsd >= 0.17.0
Browse files Browse the repository at this point in the history
The `generate` has been deprecated since 0.16 and has been removed in 0.18.0
so we better use `generatetoaddress` instead, which is already what we do with
`bitcoind`. So we remove the override here.
  • Loading branch information
cdecker committed Jan 25, 2020
1 parent a602311 commit 1e6b6b5
Showing 1 changed file with 0 additions and 11 deletions.
11 changes: 0 additions & 11 deletions contrib/pyln-testing/pyln/testing/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -443,17 +443,6 @@ def __init__(self, bitcoin_dir="/tmp/bitcoind-test", rpcport=None):
self.rpc = SimpleBitcoinProxy(btc_conf_file=self.conf_file)
self.prefix = 'elementsd'

def generate_block(self, numblocks=1, wait_for_mempool=0):
if wait_for_mempool:
if isinstance(wait_for_mempool, str):
wait_for_mempool = [wait_for_mempool]
if isinstance(wait_for_mempool, list):
wait_for(lambda: all(txid in self.rpc.getrawmempool() for txid in wait_for_mempool))
else:
wait_for(lambda: len(self.rpc.getrawmempool()) >= wait_for_mempool)
# 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
"""
Expand Down

0 comments on commit 1e6b6b5

Please sign in to comment.