aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@gmail.com>2018-07-30 16:30:43 +0200
committerWladimir J. van der Laan <laanwj@gmail.com>2018-07-30 16:30:54 +0200
commit63d73f5bc8546136cf745b0b4cb36c3081541068 (patch)
tree97c29f37de21c67daf0d6845c3ca0173b322cd49
parentf8685f461b102a3381f28e5071d304fee3e39e76 (diff)
parentbd9d0690dcc62bb6dc01bda38f63fa965003b8b9 (diff)
downloadbitcoin-63d73f5bc8546136cf745b0b4cb36c3081541068.tar.xz
Merge #13554: Remove unused function arguments
bd9d0690dcc62bb6dc01bda38f63fa965003b8b9 Remove unused argument to WitnessSigOps(...) (practicalswift) d1d7cfebd2c22bdec9ed96d8a389c00d7f898ff8 Remove unused argument to DefaultOptions(...) (practicalswift) 05dbb0c042ba647bf83c15f059c41620e2164337 Remove unused argument to ThreadHTTP(...) (practicalswift) Pull request description: Remove unused function arguments. Tree-SHA512: 9933b6d34ff00a32d2f06a2e542d1225bdfb2c960599f01a8ff0427324b3529db49f19ffdbf54059acbbef5ca87f4c3169e97082169022022cd1e3afa7aaa56d
-rw-r--r--src/httpserver.cpp6
-rw-r--r--src/miner.cpp4
-rw-r--r--src/script/interpreter.cpp6
3 files changed, 8 insertions, 8 deletions
diff --git a/src/httpserver.cpp b/src/httpserver.cpp
index 3a3a26b7db..9daf3d1968 100644
--- a/src/httpserver.cpp
+++ b/src/httpserver.cpp
@@ -279,7 +279,7 @@ static void http_reject_request_cb(struct evhttp_request* req, void*)
}
/** Event dispatcher thread */
-static bool ThreadHTTP(struct event_base* base, struct evhttp* http)
+static bool ThreadHTTP(struct event_base* base)
{
RenameThread("bitcoin-http");
LogPrint(BCLog::HTTP, "Entering http event loop\n");
@@ -428,9 +428,9 @@ void StartHTTPServer()
LogPrint(BCLog::HTTP, "Starting HTTP server\n");
int rpcThreads = std::max((long)gArgs.GetArg("-rpcthreads", DEFAULT_HTTP_THREADS), 1L);
LogPrintf("HTTP: starting %d worker threads\n", rpcThreads);
- std::packaged_task<bool(event_base*, evhttp*)> task(ThreadHTTP);
+ std::packaged_task<bool(event_base*)> task(ThreadHTTP);
threadResult = task.get_future();
- threadHTTP = std::thread(std::move(task), eventBase, eventHTTP);
+ threadHTTP = std::thread(std::move(task), eventBase);
for (int i = 0; i < rpcThreads; i++) {
g_thread_http_workers.emplace_back(HTTPWorkQueueRun, workQueue);
diff --git a/src/miner.cpp b/src/miner.cpp
index 738ccad1b9..c32dc26f86 100644
--- a/src/miner.cpp
+++ b/src/miner.cpp
@@ -64,7 +64,7 @@ BlockAssembler::BlockAssembler(const CChainParams& params, const Options& option
nBlockMaxWeight = std::max<size_t>(4000, std::min<size_t>(MAX_BLOCK_WEIGHT - 4000, options.nBlockMaxWeight));
}
-static BlockAssembler::Options DefaultOptions(const CChainParams& params)
+static BlockAssembler::Options DefaultOptions()
{
// Block resource limits
// If -blockmaxweight is not given, limit to DEFAULT_BLOCK_MAX_WEIGHT
@@ -80,7 +80,7 @@ static BlockAssembler::Options DefaultOptions(const CChainParams& params)
return options;
}
-BlockAssembler::BlockAssembler(const CChainParams& params) : BlockAssembler(params, DefaultOptions(params)) {}
+BlockAssembler::BlockAssembler(const CChainParams& params) : BlockAssembler(params, DefaultOptions()) {}
void BlockAssembler::resetBlock()
{
diff --git a/src/script/interpreter.cpp b/src/script/interpreter.cpp
index 1936d44cd5..be2138d502 100644
--- a/src/script/interpreter.cpp
+++ b/src/script/interpreter.cpp
@@ -1588,7 +1588,7 @@ bool VerifyScript(const CScript& scriptSig, const CScript& scriptPubKey, const C
return set_success(serror);
}
-size_t static WitnessSigOps(int witversion, const std::vector<unsigned char>& witprogram, const CScriptWitness& witness, int flags)
+size_t static WitnessSigOps(int witversion, const std::vector<unsigned char>& witprogram, const CScriptWitness& witness)
{
if (witversion == 0) {
if (witprogram.size() == WITNESS_V0_KEYHASH_SIZE)
@@ -1616,7 +1616,7 @@ size_t CountWitnessSigOps(const CScript& scriptSig, const CScript& scriptPubKey,
int witnessversion;
std::vector<unsigned char> witnessprogram;
if (scriptPubKey.IsWitnessProgram(witnessversion, witnessprogram)) {
- return WitnessSigOps(witnessversion, witnessprogram, witness ? *witness : witnessEmpty, flags);
+ return WitnessSigOps(witnessversion, witnessprogram, witness ? *witness : witnessEmpty);
}
if (scriptPubKey.IsPayToScriptHash() && scriptSig.IsPushOnly()) {
@@ -1628,7 +1628,7 @@ size_t CountWitnessSigOps(const CScript& scriptSig, const CScript& scriptPubKey,
}
CScript subscript(data.begin(), data.end());
if (subscript.IsWitnessProgram(witnessversion, witnessprogram)) {
- return WitnessSigOps(witnessversion, witnessprogram, witness ? *witness : witnessEmpty, flags);
+ return WitnessSigOps(witnessversion, witnessprogram, witness ? *witness : witnessEmpty);
}
}