wallet: Re-introduce change assertion for withdrawals

This was removed because withdraw-to-self results in more than the
change being sent to us.

Signed-off-by: Christian Decker <decker.christian@gmail.com>
This commit is contained in:
Christian Decker 2018-02-05 18:48:57 +01:00 committed by Rusty Russell
parent b2abe0d250
commit 4fd7e26bf7

View File

@ -61,6 +61,7 @@ static void wallet_withdrawal_broadcast(struct bitcoind *bitcoind,
/* Note normally, change_satoshi == withdraw->changesatoshi, but
* not if we're actually making a payment to ourselves! */
assert(change_satoshi >= withdraw->changesatoshi);
struct json_result *response = new_json_result(cmd);
json_object_start(response, NULL);