Browse Source

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>
ppa-0.6.1
Rusty Russell 7 years ago
parent
commit
ba34e6cdc9
  1. 2
      gossipd/broadcast.c
  2. 2
      gossipd/broadcast.h

2
gossipd/broadcast.c

@ -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;
}

2
gossipd/broadcast.h

@ -20,7 +20,7 @@ struct queued_message {
};
struct broadcast_state {
u32 next_index;
u64 next_index;
UINTMAP(struct queued_message *) broadcasts;
};

Loading…
Cancel
Save