mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-01-19 05:44:12 +01:00
amount: helper for msat == 0
Shorthand for checking if value is zero
This commit is contained in:
parent
43ade318d9
commit
5e1d8d6ad6
@ -360,6 +360,11 @@ bool amount_sat_zero(struct amount_sat a)
|
||||
return a.satoshis == 0;
|
||||
}
|
||||
|
||||
bool amount_msat_zero(struct amount_msat a)
|
||||
{
|
||||
return a.millisatoshis == 0;
|
||||
}
|
||||
|
||||
bool amount_msat_eq(struct amount_msat a, struct amount_msat b)
|
||||
{
|
||||
return a.millisatoshis == b.millisatoshis;
|
||||
|
@ -94,6 +94,7 @@ bool amount_msat_eq(struct amount_msat a, struct amount_msat b);
|
||||
|
||||
/* Is a zero? */
|
||||
bool amount_sat_zero(struct amount_sat a);
|
||||
bool amount_msat_zero(struct amount_msat a);
|
||||
|
||||
/* Is a > b? */
|
||||
bool amount_sat_greater(struct amount_sat a, struct amount_sat b);
|
||||
|
Loading…
Reference in New Issue
Block a user