|
@ -33,7 +33,6 @@ |
|
|
#include <common/peer_failed.h> |
|
|
#include <common/peer_failed.h> |
|
|
#include <common/peer_status_wiregen.h> |
|
|
#include <common/peer_status_wiregen.h> |
|
|
#include <common/penalty_base.h> |
|
|
#include <common/penalty_base.h> |
|
|
#include <common/pseudorand.h> |
|
|
|
|
|
#include <common/read_peer_msg.h> |
|
|
#include <common/read_peer_msg.h> |
|
|
#include <common/status.h> |
|
|
#include <common/status.h> |
|
|
#include <common/subdaemon.h> |
|
|
#include <common/subdaemon.h> |
|
@ -214,22 +213,6 @@ static void set_reserve(struct state *state, const struct amount_sat dust_limit) |
|
|
= dust_limit; |
|
|
= dust_limit; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
/* BOLT #2:
|
|
|
|
|
|
* |
|
|
|
|
|
* The sending node: |
|
|
|
|
|
*... |
|
|
|
|
|
* - MUST ensure `temporary_channel_id` is unique from any other channel ID |
|
|
|
|
|
* with the same peer. |
|
|
|
|
|
*/ |
|
|
|
|
|
static void temporary_channel_id(struct channel_id *channel_id) |
|
|
|
|
|
{ |
|
|
|
|
|
size_t i; |
|
|
|
|
|
|
|
|
|
|
|
/* Randomness FTW. */ |
|
|
|
|
|
for (i = 0; i < sizeof(*channel_id); i++) |
|
|
|
|
|
channel_id->id[i] = pseudorand(256); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/*~ Handle random messages we might get during opening negotiation, (eg. gossip)
|
|
|
/*~ Handle random messages we might get during opening negotiation, (eg. gossip)
|
|
|
* returning the first non-handled one, or NULL if we aborted negotiation. */ |
|
|
* returning the first non-handled one, or NULL if we aborted negotiation. */ |
|
|
static u8 *opening_negotiate_msg(const tal_t *ctx, struct state *state, |
|
|
static u8 *opening_negotiate_msg(const tal_t *ctx, struct state *state, |
|
|