mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-01-18 05:12:45 +01:00
Avoid compile error on macos mojave
Fixing the following error by changing 'enum feerate' to int. lightningd/bitcoind.c:183:29: error: result of comparison of constant 8 with expression of type 'enum feerate' is always true [-Werror, -Wtautological-constant-out-of-range-compare] for (enum feerate f = 0; f < NUM_FEERATES; f++) { Changelog-Fixed: compile error on macos
This commit is contained in:
parent
c6186829df
commit
4d672077e1
@ -181,7 +181,7 @@ static void estimatefees_callback(const char *buf, const jsmntok_t *toks,
|
||||
"estimatefees",
|
||||
"bad 'result' field");
|
||||
|
||||
for (enum feerate f = 0; f < NUM_FEERATES; f++) {
|
||||
for (int f = 0; f < NUM_FEERATES; f++) {
|
||||
feeratetok = json_get_member(buf, resulttok, feerate_name(f));
|
||||
if (!feeratetok)
|
||||
bitcoin_plugin_error(call->bitcoind, buf, toks,
|
||||
|
@ -362,7 +362,7 @@ static void add_feerate_history(struct chain_topology *topo,
|
||||
/* Did the the feerate change since we last estimated it ? */
|
||||
static bool feerate_changed(struct chain_topology *topo, u32 old_feerates[])
|
||||
{
|
||||
for (enum feerate f = 0; f < NUM_FEERATES; f++) {
|
||||
for (int f = 0; f < NUM_FEERATES; f++) {
|
||||
if (try_get_feerate(topo, f) != old_feerates[f])
|
||||
return true;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user