Implement basic low water connection policy.

This commit is contained in:
Arthur Britto
2012-05-01 00:36:42 -07:00
parent 785f9b056a
commit 43ac5f8023
5 changed files with 121 additions and 23 deletions

View File

@@ -516,6 +516,12 @@ void Peer::recvHello(newcoin::TMHello& packet)
// No longer connecting as client.
mClientConnect = false;
}
else
{
// XXX At this point we could add the inbound connection to our IP list. However, the inbound IP address might be that of
// a NAT. It would be best to only add it if and only if we can immediatly verify it.
nothing();
}
// XXX Set timer: connection is in grace period to be useful.
// XXX Set timer: connection idle (idle may vary depending on connection type.)