test_lightningd: Also test receive of P2WPKH is correct.

For completeness.
Existing test will check P2SH-P2WPKH address only.
P2WPKH seems OK but test it anyway in case of regression.
This commit is contained in:
ZmnSCPxj 2018-04-21 12:29:18 +00:00 committed by Christian Decker
parent 990ef729b0
commit 78a074af5a

View File

@ -3498,6 +3498,16 @@ class LightningDTests(BaseLightningDTests):
output = l1.rpc.listfunds()['outputs'][0]
assert output['address'] == addr
# Send all our money to a P2WPKH address this time.
addr = l1.rpc.newaddr("bech32")['address']
l1.rpc.withdraw(addr, "all")
l1.bitcoin.rpc.generate(1)
time.sleep(1)
# The address we detect must match what was paid to.
output = l1.rpc.listfunds()['outputs'][0]
assert output['address'] == addr
@unittest.skipIf(not DEVELOPER, "needs DEVELOPER=1")
def test_channel_persistence(self):
# Start two nodes and open a channel (to remember). l2 will