Changeset View
Changeset View
Standalone View
Standalone View
src/addrdb.cpp
// Copyright (c) 2009-2010 Satoshi Nakamoto | // Copyright (c) 2009-2010 Satoshi Nakamoto | ||||
// Copyright (c) 2009-2016 The Bitcoin Core developers | // Copyright (c) 2009-2016 The Bitcoin Core developers | ||||
// Distributed under the MIT software license, see the accompanying | // Distributed under the MIT software license, see the accompanying | ||||
// file COPYING or http://www.opensource.org/licenses/mit-license.php. | // file COPYING or http://www.opensource.org/licenses/mit-license.php. | ||||
#include "addrdb.h" | #include <addrdb.h> | ||||
#include "addrman.h" | #include <addrman.h> | ||||
#include "chainparams.h" | #include <chainparams.h> | ||||
#include "clientversion.h" | #include <clientversion.h> | ||||
#include "fs.h" | #include <fs.h> | ||||
#include "hash.h" | #include <hash.h> | ||||
#include "random.h" | #include <random.h> | ||||
#include "streams.h" | #include <streams.h> | ||||
#include "tinyformat.h" | #include <tinyformat.h> | ||||
#include "util.h" | #include <util.h> | ||||
CBanDB::CBanDB(const CChainParams &chainParamsIn) : chainParams(chainParamsIn) { | CBanDB::CBanDB(const CChainParams &chainParamsIn) : chainParams(chainParamsIn) { | ||||
pathBanlist = GetDataDir() / "banlist.dat"; | pathBanlist = GetDataDir() / "banlist.dat"; | ||||
} | } | ||||
bool CBanDB::Write(const banmap_t &banSet) { | bool CBanDB::Write(const banmap_t &banSet) { | ||||
// Generate random temporary filename | // Generate random temporary filename | ||||
unsigned short randv = 0; | unsigned short randv = 0; | ||||
▲ Show 20 Lines • Show All 184 Lines • Show Last 20 Lines |