coin moves: notify when we make deposits to external accounts

The blockheight is zero though, since these aren't included in a block
yet.

We also don't issue an 'external' deposit event if we can tell that the
address you're sending to actually belongs to our wallet (we'll issue a
deposit event when it gets included in a block)
This commit is contained in:
niftynei
2022-01-25 14:24:31 -06:00
committed by Rusty Russell
parent 7f511b9ba9
commit 4dafeede5c
9 changed files with 144 additions and 11 deletions

View File

@@ -136,7 +136,7 @@ def check_coin_moves(n, account_id, expected_moves, chainparams):
assert mv['timestamp'] > 0
assert mv['coin_type'] == chainparams['bip173_prefix']
# chain moves should have blockheights
if mv['type'] == 'chain_mvt':
if mv['type'] == 'chain_mvt' and mv['account_id'] != 'external':
assert mv['blockheight'] is not None
for num, m in enumerate(expected_moves):