walletrpc: don't assert() when we pay ourselves.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell
2018-01-29 16:29:21 +10:30
committed by Christian Decker
parent 0d3eaef945
commit 6d0fd84c63
2 changed files with 10 additions and 1 deletions

View File

@@ -2427,6 +2427,13 @@ class LightningDTests(BaseLightningDTests):
c.execute('SELECT COUNT(*) FROM outputs WHERE status=0')
assert(c.fetchone()[0] == 6)
# Test withdrawal to self.
out = l1.rpc.withdraw(l1.rpc.newaddr()['address'], 'all')
bitcoind.rpc.generate(1)
c = db.cursor()
c.execute('SELECT COUNT(*) FROM outputs WHERE status=0')
assert(c.fetchone()[0] == 1)
out = l1.rpc.withdraw(waddr, 'all')
c = db.cursor()
c.execute('SELECT COUNT(*) FROM outputs WHERE status=0')