coinmvt: don't use msats in fields not called "_msat".

The new msat fields are turned into Millisatoshi, so handle that correctly
too in tests too.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Changelog-Deprecated: Plugins: `coin_movement` notification: `balance`, `credit`, `debit` and `fees` (use `balance_msat`, `credit_msat`, `debit_msat` and `fees_msat`)
This commit is contained in:
Rusty Russell
2022-06-19 16:49:11 +09:30
parent e2f0ca9cbe
commit ca69e293d1
7 changed files with 87 additions and 74 deletions

View File

@@ -626,11 +626,11 @@ def test_withdraw_misc(node_factory, bitcoind, chainparams):
assert account_balance(l1, 'wallet') == 0
external_moves = [
{'type': 'chain_mvt', 'credit': 2000000000, 'debit': 0, 'tags': ['deposit']},
{'type': 'chain_mvt', 'credit': 2000000000, 'debit': 0, 'tags': ['deposit']},
{'type': 'chain_mvt', 'credit': 2000000000, 'debit': 0, 'tags': ['deposit']},
{'type': 'chain_mvt', 'credit': 2000000000, 'debit': 0, 'tags': ['deposit']},
{'type': 'chain_mvt', 'credit': 11957603000, 'debit': 0, 'tags': ['deposit']},
{'type': 'chain_mvt', 'credit_msat': 2000000000, 'debit_msat': 0, 'tags': ['deposit']},
{'type': 'chain_mvt', 'credit_msat': 2000000000, 'debit_msat': 0, 'tags': ['deposit']},
{'type': 'chain_mvt', 'credit_msat': 2000000000, 'debit_msat': 0, 'tags': ['deposit']},
{'type': 'chain_mvt', 'credit_msat': 2000000000, 'debit_msat': 0, 'tags': ['deposit']},
{'type': 'chain_mvt', 'credit_msat': 11957603000, 'debit_msat': 0, 'tags': ['deposit']},
]
check_coin_moves(l1, 'external', external_moves, chainparams)