mirror of
https://github.com/ElementsProject/lightning.git
synced 2024-11-19 09:54:16 +01:00
lightningd: rename activate_peers() to setup_peers().
Activate means a specific thing now (connectd said something), so avoid confusing it with this function. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
parent
90be2cc104
commit
33abf93ec1
@ -1151,7 +1151,7 @@ int main(int argc, char *argv[])
|
||||
/*~ This is where we ask connectd to reconnect to any peers who have
|
||||
* live channels with us, and makes sure we're watching the funding
|
||||
* tx. */
|
||||
activate_peers(ld);
|
||||
setup_peers(ld);
|
||||
|
||||
/*~ Now that all the notifications for transactions are in place, we
|
||||
* can start the poll loop which queries bitcoind for new blocks. */
|
||||
|
@ -1784,7 +1784,7 @@ command_find_channel(struct command *cmd,
|
||||
}
|
||||
}
|
||||
|
||||
static void activate_peer(struct peer *peer, u32 delay)
|
||||
static void setup_peer(struct peer *peer, u32 delay)
|
||||
{
|
||||
struct channel *channel;
|
||||
struct channel_inflight *inflight;
|
||||
@ -1815,14 +1815,14 @@ static void activate_peer(struct peer *peer, u32 delay)
|
||||
}
|
||||
}
|
||||
|
||||
void activate_peers(struct lightningd *ld)
|
||||
void setup_peers(struct lightningd *ld)
|
||||
{
|
||||
struct peer *p;
|
||||
/* Avoid thundering herd: after first five, delay by 1 second. */
|
||||
int delay = -5;
|
||||
|
||||
list_for_each(&ld->peers, p, list) {
|
||||
activate_peer(p, delay > 0 ? delay : 0);
|
||||
setup_peer(p, delay > 0 ? delay : 0);
|
||||
delay++;
|
||||
}
|
||||
}
|
||||
|
@ -84,7 +84,7 @@ void channel_errmsg(struct channel *channel,
|
||||
u8 *p2wpkh_for_keyidx(const tal_t *ctx, struct lightningd *ld, u64 keyidx);
|
||||
|
||||
/* We've loaded peers from database, set them going. */
|
||||
void activate_peers(struct lightningd *ld);
|
||||
void setup_peers(struct lightningd *ld);
|
||||
|
||||
void drop_to_chain(struct lightningd *ld, struct channel *channel, bool cooperative);
|
||||
|
||||
|
@ -7,9 +7,6 @@ int unused_main(int argc, char *argv[]);
|
||||
#include <common/setup.h>
|
||||
|
||||
/* AUTOGENERATED MOCKS START */
|
||||
/* Generated stub for activate_peers */
|
||||
void activate_peers(struct lightningd *ld UNNEEDED)
|
||||
{ fprintf(stderr, "activate_peers called!\n"); abort(); }
|
||||
/* Generated stub for begin_topology */
|
||||
void begin_topology(struct chain_topology *topo UNNEEDED)
|
||||
{ fprintf(stderr, "begin_topology called!\n"); abort(); }
|
||||
@ -191,6 +188,9 @@ void plugins_set_builtin_plugins_dir(struct plugins *plugins UNNEEDED,
|
||||
/* Generated stub for setup_color_and_alias */
|
||||
void setup_color_and_alias(struct lightningd *ld UNNEEDED)
|
||||
{ fprintf(stderr, "setup_color_and_alias called!\n"); abort(); }
|
||||
/* Generated stub for setup_peers */
|
||||
void setup_peers(struct lightningd *ld UNNEEDED)
|
||||
{ fprintf(stderr, "setup_peers called!\n"); abort(); }
|
||||
/* Generated stub for setup_topology */
|
||||
void setup_topology(struct chain_topology *topology UNNEEDED,
|
||||
u32 min_blockheight UNNEEDED, u32 max_blockheight UNNEEDED)
|
||||
|
Loading…
Reference in New Issue
Block a user