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:
Rusty Russell 2018-03-14 02:05:55 +10:30
parent 640ff4b4b9
commit ba34e6cdc9
2 changed files with 2 additions and 2 deletions

View File

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

View File

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