mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-01-17 19:03:42 +01:00
moveonly: Move find_pending_cannouncement up
This commit is contained in:
parent
8248dccaee
commit
e2f5e4bb3c
@ -519,6 +519,22 @@ static bool check_channel_announcement(
|
||||
check_signed_hash(&hash, bitcoin2_sig, bitcoin2_key);
|
||||
}
|
||||
|
||||
/* While master always processes in order, bitcoind is async, so they could
|
||||
* theoretically return out of order. */
|
||||
static struct pending_cannouncement *
|
||||
find_pending_cannouncement(struct routing_state *rstate,
|
||||
const struct short_channel_id *scid)
|
||||
{
|
||||
struct pending_cannouncement *i;
|
||||
|
||||
list_for_each(&rstate->pending_cannouncement, i, list) {
|
||||
if (short_channel_id_eq(scid, &i->short_channel_id))
|
||||
return i;
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
const struct short_channel_id *handle_channel_announcement(
|
||||
struct routing_state *rstate,
|
||||
const u8 *announce TAKES)
|
||||
@ -606,21 +622,6 @@ const struct short_channel_id *handle_channel_announcement(
|
||||
return &pending->short_channel_id;
|
||||
}
|
||||
|
||||
/* While master always processes in order, bitcoind is async, so they could
|
||||
* theoretically return out of order. */
|
||||
static struct pending_cannouncement *
|
||||
find_pending_cannouncement(struct routing_state *rstate,
|
||||
const struct short_channel_id *scid)
|
||||
{
|
||||
struct pending_cannouncement *i;
|
||||
|
||||
list_for_each(&rstate->pending_cannouncement, i, list) {
|
||||
if (short_channel_id_eq(scid, &i->short_channel_id))
|
||||
return i;
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
bool handle_pending_cannouncement(struct routing_state *rstate,
|
||||
const struct short_channel_id *scid,
|
||||
const u8 *outscript)
|
||||
|
Loading…
Reference in New Issue
Block a user