Skip to content

Commit

Permalink
Merge bitcoin#13554: Remove unused function arguments
Browse files Browse the repository at this point in the history
bd9d069 Remove unused argument to WitnessSigOps(...) (practicalswift)
d1d7cfe Remove unused argument to DefaultOptions(...) (practicalswift)
05dbb0c Remove unused argument to ThreadHTTP(...) (practicalswift)

Pull request description:

  Remove unused function arguments.

Tree-SHA512: 9933b6d34ff00a32d2f06a2e542d1225bdfb2c960599f01a8ff0427324b3529db49f19ffdbf54059acbbef5ca87f4c3169e97082169022022cd1e3afa7aaa56d
  • Loading branch information
laanwj committed Jul 30, 2018
2 parents f8685f4 + bd9d069 commit 63d73f5
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
6 changes: 3 additions & 3 deletions src/httpserver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down Expand Up @@ -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);
Expand Down
4 changes: 2 additions & 2 deletions src/miner.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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()
{
Expand Down
6 changes: 3 additions & 3 deletions src/script/interpreter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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()) {
Expand All @@ -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);
}
}

Expand Down

0 comments on commit 63d73f5

Please sign in to comment.