use CBanEntry as object container for banned nodes

- added a reason enum for a ban
- added creation time for a ban

Using CBanEntry as container will keep banlist.dat extenable.
This commit is contained in:
Jonas Schnelli
2015-06-26 21:38:33 +02:00
parent dfa174c295
commit 409bccfbf5
5 changed files with 106 additions and 37 deletions

View File

@@ -4959,7 +4959,7 @@ bool SendMessages(CNode* pto, bool fSendTrickle)
LogPrintf("Warning: not banning local peer %s!\n", pto->addr.ToString());
else
{
CNode::Ban(pto->addr);
CNode::Ban(pto->addr, BanReasonNodeMisbehaving);
}
}
state.fShouldBan = false;