Commit 0c0fbcbd authored by Antoine Kaufmann's avatar Antoine Kaufmann
Browse files

dist/sockets: validate postion when sending entries (for debug)

parent 59abd0fd
......@@ -499,6 +499,13 @@ int NetOpPassEntries(struct Peer *peer, uint32_t pos, uint32_t n) {
abort();
}
if ((peer->last_sent_pos + 1) % peer->local_enum != pos) {
fprintf(stderr, "NetOpPassEntries: entry sent repeatedly: p=%u n=%u\n",
pos, n);
abort();
}
peer->last_sent_pos = pos + n - 1;
struct SockMsg *msg = SockMsgAlloc();
if (!msg)
return 1;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment