dualopend: make is_dust test match the spec.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
committed by
Alex Myers
parent
a9dffcb1e4
commit
8b8f703db3
@@ -564,11 +564,18 @@ static void check_channel_id(struct state *state,
|
||||
id_in));
|
||||
}
|
||||
|
||||
/* BOLT #2:
|
||||
* The receiving node:
|
||||
*...
|
||||
* - MUST fail the negotiation if:
|
||||
*...
|
||||
* - the `sats` amount is less than the `dust_limit`
|
||||
*/
|
||||
static bool is_dust(struct tx_state *tx_state,
|
||||
struct amount_sat amount)
|
||||
{
|
||||
return !amount_sat_greater(amount, tx_state->localconf.dust_limit)
|
||||
|| !amount_sat_greater(amount, tx_state->remoteconf.dust_limit);
|
||||
return amount_sat_less(amount, tx_state->localconf.dust_limit)
|
||||
|| amount_sat_less(amount, tx_state->remoteconf.dust_limit);
|
||||
}
|
||||
|
||||
static char *validate_inputs(struct state *state,
|
||||
|
||||
Reference in New Issue
Block a user