mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-24 09:34:24 +01:00
gossipd: use u64 for broadcast index.
uintmap uses uint64_t, we should here too. Couldn't resist drive-by style fix for increment :) Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
@@ -71,7 +71,7 @@ bool queue_broadcast(struct broadcast_state *bstate,
|
||||
/* Now add the message to the queue */
|
||||
msg = new_queued_message(bstate, type, tag, payload);
|
||||
uintmap_add(&bstate->broadcasts, bstate->next_index, msg);
|
||||
bstate->next_index += 1;
|
||||
bstate->next_index++;
|
||||
return evicted;
|
||||
}
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@ struct queued_message {
|
||||
};
|
||||
|
||||
struct broadcast_state {
|
||||
u32 next_index;
|
||||
u64 next_index;
|
||||
UINTMAP(struct queued_message *) broadcasts;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user