Skip to content

Commit 8dc957a

Browse files
Remove unused code
1 parent 8040ae6 commit 8dc957a

File tree

13 files changed

+0
-78
lines changed

13 files changed

+0
-78
lines changed

src/bitcoin-tx.cpp

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -483,22 +483,6 @@ static bool findSighashFlags(int& flags, const std::string& flagStr)
483483
return false;
484484
}
485485

486-
uint256 ParseHashUO(std::map<std::string,UniValue>& o, std::string strKey)
487-
{
488-
if (!o.count(strKey))
489-
return uint256();
490-
return ParseHashUV(o[strKey], strKey);
491-
}
492-
493-
std::vector<unsigned char> ParseHexUO(std::map<std::string,UniValue>& o, std::string strKey)
494-
{
495-
if (!o.count(strKey)) {
496-
std::vector<unsigned char> emptyVec;
497-
return emptyVec;
498-
}
499-
return ParseHexUV(o[strKey], strKey);
500-
}
501-
502486
static CAmount AmountFromValue(const UniValue& value)
503487
{
504488
if (!value.isNum() && !value.isStr())

src/chainparams.cpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,6 @@ class CMainParams : public CChainParams {
135135

136136
vFixedSeeds = std::vector<SeedSpec6>(pnSeed6_main, pnSeed6_main + ARRAYLEN(pnSeed6_main));
137137

138-
fMiningRequiresPeers = true;
139138
fDefaultConsistencyChecks = false;
140139
fRequireStandard = true;
141140
fMineBlocksOnDemand = false;
@@ -235,7 +234,6 @@ class CTestNetParams : public CChainParams {
235234

236235
vFixedSeeds = std::vector<SeedSpec6>(pnSeed6_test, pnSeed6_test + ARRAYLEN(pnSeed6_test));
237236

238-
fMiningRequiresPeers = true;
239237
fDefaultConsistencyChecks = false;
240238
fRequireStandard = false;
241239
fMineBlocksOnDemand = false;
@@ -307,7 +305,6 @@ class CRegTestParams : public CChainParams {
307305
vFixedSeeds.clear(); //!< Regtest mode doesn't have any fixed seeds.
308306
vSeeds.clear(); //!< Regtest mode doesn't have any DNS seeds.
309307

310-
fMiningRequiresPeers = false;
311308
fDefaultConsistencyChecks = true;
312309
fRequireStandard = false;
313310
fMineBlocksOnDemand = true;

src/chainparams.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,6 @@ class CChainParams
6161
int GetDefaultPort() const { return nDefaultPort; }
6262

6363
const CBlock& GenesisBlock() const { return genesis; }
64-
/** Make miner wait to have peers to avoid wasting work */
65-
bool MiningRequiresPeers() const { return fMiningRequiresPeers; }
6664
/** Default value for -checkmempool and -checkblockindex argument */
6765
bool DefaultConsistencyChecks() const { return fDefaultConsistencyChecks; }
6866
/** Policy: Filter transactions that do not match well-defined patterns */
@@ -89,7 +87,6 @@ class CChainParams
8987
std::string strNetworkID;
9088
CBlock genesis;
9189
std::vector<SeedSpec6> vFixedSeeds;
92-
bool fMiningRequiresPeers;
9390
bool fDefaultConsistencyChecks;
9491
bool fRequireStandard;
9592
bool fMineBlocksOnDemand;

src/coins.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -290,7 +290,6 @@ class CCoinsViewCursor
290290

291291
virtual bool GetKey(uint256 &key) const = 0;
292292
virtual bool GetValue(CCoins &coins) const = 0;
293-
/* Don't care about GetKeySize here */
294293
virtual unsigned int GetValueSize() const = 0;
295294

296295
virtual bool Valid() const = 0;

src/dbwrapper.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -132,10 +132,6 @@ class CDBIterator
132132
return true;
133133
}
134134

135-
unsigned int GetKeySize() {
136-
return piter->key().size();
137-
}
138-
139135
template<typename V> bool GetValue(V& value) {
140136
leveldb::Slice slValue = piter->value();
141137
try {

src/httpserver.cpp

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -146,13 +146,6 @@ class WorkQueue
146146
while (numThreads > 0)
147147
cond.wait(lock);
148148
}
149-
150-
/** Return current depth of queue */
151-
size_t Depth()
152-
{
153-
std::unique_lock<std::mutex> lock(cs);
154-
return queue.size();
155-
}
156149
};
157150

158151
struct HTTPPathHandler

src/net.cpp

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2406,11 +2406,6 @@ void CConnman::MarkAddressGood(const CAddress& addr)
24062406
addrman.Good(addr);
24072407
}
24082408

2409-
void CConnman::AddNewAddress(const CAddress& addr, const CAddress& addrFrom, int64_t nTimePenalty)
2410-
{
2411-
addrman.Add(addr, addrFrom, nTimePenalty);
2412-
}
2413-
24142409
void CConnman::AddNewAddresses(const std::vector<CAddress>& vAddr, const CAddress& addrFrom, int64_t nTimePenalty)
24152410
{
24162411
addrman.Add(vAddr, addrFrom, nTimePenalty);

src/net.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -207,10 +207,8 @@ class CConnman
207207
size_t GetAddressCount() const;
208208
void SetServices(const CService &addr, ServiceFlags nServices);
209209
void MarkAddressGood(const CAddress& addr);
210-
void AddNewAddress(const CAddress& addr, const CAddress& addrFrom, int64_t nTimePenalty = 0);
211210
void AddNewAddresses(const std::vector<CAddress>& vAddr, const CAddress& addrFrom, int64_t nTimePenalty = 0);
212211
std::vector<CAddress> GetAddresses();
213-
void AddressCurrentlyConnected(const CService& addr);
214212

215213
// Denial-of-service detection/prevention
216214
// The idea is to detect peers that are behaving

src/rpc/server.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ namespace RPCServer
2828
void OnStarted(boost::function<void ()> slot);
2929
void OnStopped(boost::function<void ()> slot);
3030
void OnPreCommand(boost::function<void (const CRPCCommand&)> slot);
31-
void OnPostCommand(boost::function<void (const CRPCCommand&)> slot);
3231
}
3332

3433
class CBlockIndex;

src/sync.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,6 @@ struct CLockLocation {
4646
return mutexName + " " + sourceFile + ":" + itostr(sourceLine) + (fTry ? " (TRY)" : "");
4747
}
4848

49-
std::string MutexName() const { return mutexName; }
50-
5149
bool fTry;
5250
private:
5351
std::string mutexName;

0 commit comments

Comments
 (0)