banman: Add, use CBanEntry ctor that takes ban reason

This commit is contained in:
Carl Dong
2019-01-03 21:26:10 +08:00
parent 1ffa4ce27d
commit c2e04d37f3
2 changed files with 6 additions and 2 deletions

View File

@@ -102,8 +102,7 @@ void BanMan::Ban(const CNetAddr& netAddr, const BanReason& banReason, int64_t ba
void BanMan::Ban(const CSubNet& subNet, const BanReason& banReason, int64_t bantimeoffset, bool sinceUnixEpoch)
{
CBanEntry banEntry(GetTime());
banEntry.banReason = banReason;
CBanEntry banEntry(GetTime(), banReason);
int64_t normalized_bantimeoffset = bantimeoffset;
bool normalized_sinceUnixEpoch = sinceUnixEpoch;