cleanup: lowercase name of feerates, immediate -> urgent.
This is only used for logging now, but it gets more important as it enters the RPC API. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
parent
9d517ddc1d
commit
9d37b78088
|
@ -278,8 +278,12 @@ static void watch_for_utxo_reconfirmation(struct chain_topology *topo,
|
|||
|
||||
static const char *feerate_name(enum feerate feerate)
|
||||
{
|
||||
return feerate == FEERATE_IMMEDIATE ? "Immediate"
|
||||
: feerate == FEERATE_NORMAL ? "Normal" : "Slow";
|
||||
switch (feerate) {
|
||||
case FEERATE_URGENT: return "urgent";
|
||||
case FEERATE_NORMAL: return "normal";
|
||||
case FEERATE_SLOW: return "slow";
|
||||
}
|
||||
abort();
|
||||
}
|
||||
|
||||
/* Mutual recursion via timer. */
|
||||
|
|
|
@ -20,7 +20,7 @@ struct peer;
|
|||
struct txwatch;
|
||||
|
||||
enum feerate {
|
||||
FEERATE_IMMEDIATE, /* Aka: aim for next block. */
|
||||
FEERATE_URGENT, /* Aka: aim for next block. */
|
||||
FEERATE_NORMAL, /* Aka: next 4 blocks or so. */
|
||||
FEERATE_SLOW, /* Aka: next 100 blocks or so. */
|
||||
};
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
static void update_feerates(struct lightningd *ld, struct channel *channel)
|
||||
{
|
||||
u8 *msg;
|
||||
u32 feerate = try_get_feerate(ld->topology, FEERATE_IMMEDIATE);
|
||||
u32 feerate = try_get_feerate(ld->topology, FEERATE_URGENT);
|
||||
|
||||
/* Nothing to do if we don't know feerate. */
|
||||
if (!feerate)
|
||||
|
|
|
@ -230,7 +230,7 @@ u32 feerate_max(struct lightningd *ld, bool *unknown)
|
|||
return UINT_MAX;
|
||||
|
||||
/* If we don't know feerate, don't limit other side. */
|
||||
feerate = try_get_feerate(ld->topology, FEERATE_IMMEDIATE);
|
||||
feerate = try_get_feerate(ld->topology, FEERATE_URGENT);
|
||||
if (!feerate) {
|
||||
if (unknown)
|
||||
*unknown = true;
|
||||
|
|
|
@ -894,7 +894,7 @@ def test_onchain_all_dust(node_factory, bitcoind, executor):
|
|||
|
||||
# Make l1's fees really high (and wait for it to exceed 50000)
|
||||
l1.set_feerates((100000, 100000, 100000))
|
||||
l1.daemon.wait_for_log('Feerate estimate for Normal set to [56789][0-9]{4}')
|
||||
l1.daemon.wait_for_log('Feerate estimate for normal set to [56789][0-9]{4}')
|
||||
|
||||
bitcoind.generate_block(1)
|
||||
l1.daemon.wait_for_log(' to ONCHAIN')
|
||||
|
|
|
@ -1146,7 +1146,7 @@ def test_no_fee_estimate(node_factory, bitcoind, executor):
|
|||
|
||||
# Restart estimatesmartfee, wait for it to pass 5000
|
||||
l1.set_feerates((15000, 7500, 3750), True)
|
||||
l1.daemon.wait_for_log('Feerate estimate for Normal set to [567][0-9]{3}')
|
||||
l1.daemon.wait_for_log('Feerate estimate for normal set to [567][0-9]{3}')
|
||||
|
||||
# Can now fund a channel.
|
||||
l1.rpc.connect(l2.info['id'], 'localhost', l2.port)
|
||||
|
|
Loading…
Reference in New Issue