Skip to content

Commit 63d73f5

Browse files
committed
Merge bitcoin#13554: Remove unused function arguments
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
2 parents f8685f4 + bd9d069 commit 63d73f5

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

src/httpserver.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,7 @@ static void http_reject_request_cb(struct evhttp_request* req, void*)
279279
}
280280

281281
/** Event dispatcher thread */
282-
static bool ThreadHTTP(struct event_base* base, struct evhttp* http)
282+
static bool ThreadHTTP(struct event_base* base)
283283
{
284284
RenameThread("bitcoin-http");
285285
LogPrint(BCLog::HTTP, "Entering http event loop\n");
@@ -428,9 +428,9 @@ void StartHTTPServer()
428428
LogPrint(BCLog::HTTP, "Starting HTTP server\n");
429429
int rpcThreads = std::max((long)gArgs.GetArg("-rpcthreads", DEFAULT_HTTP_THREADS), 1L);
430430
LogPrintf("HTTP: starting %d worker threads\n", rpcThreads);
431-
std::packaged_task<bool(event_base*, evhttp*)> task(ThreadHTTP);
431+
std::packaged_task<bool(event_base*)> task(ThreadHTTP);
432432
threadResult = task.get_future();
433-
threadHTTP = std::thread(std::move(task), eventBase, eventHTTP);
433+
threadHTTP = std::thread(std::move(task), eventBase);
434434

435435
for (int i = 0; i < rpcThreads; i++) {
436436
g_thread_http_workers.emplace_back(HTTPWorkQueueRun, workQueue);

src/miner.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ BlockAssembler::BlockAssembler(const CChainParams& params, const Options& option
6464
nBlockMaxWeight = std::max<size_t>(4000, std::min<size_t>(MAX_BLOCK_WEIGHT - 4000, options.nBlockMaxWeight));
6565
}
6666

67-
static BlockAssembler::Options DefaultOptions(const CChainParams& params)
67+
static BlockAssembler::Options DefaultOptions()
6868
{
6969
// Block resource limits
7070
// If -blockmaxweight is not given, limit to DEFAULT_BLOCK_MAX_WEIGHT
@@ -80,7 +80,7 @@ static BlockAssembler::Options DefaultOptions(const CChainParams& params)
8080
return options;
8181
}
8282

83-
BlockAssembler::BlockAssembler(const CChainParams& params) : BlockAssembler(params, DefaultOptions(params)) {}
83+
BlockAssembler::BlockAssembler(const CChainParams& params) : BlockAssembler(params, DefaultOptions()) {}
8484

8585
void BlockAssembler::resetBlock()
8686
{

src/script/interpreter.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1588,7 +1588,7 @@ bool VerifyScript(const CScript& scriptSig, const CScript& scriptPubKey, const C
15881588
return set_success(serror);
15891589
}
15901590

1591-
size_t static WitnessSigOps(int witversion, const std::vector<unsigned char>& witprogram, const CScriptWitness& witness, int flags)
1591+
size_t static WitnessSigOps(int witversion, const std::vector<unsigned char>& witprogram, const CScriptWitness& witness)
15921592
{
15931593
if (witversion == 0) {
15941594
if (witprogram.size() == WITNESS_V0_KEYHASH_SIZE)
@@ -1616,7 +1616,7 @@ size_t CountWitnessSigOps(const CScript& scriptSig, const CScript& scriptPubKey,
16161616
int witnessversion;
16171617
std::vector<unsigned char> witnessprogram;
16181618
if (scriptPubKey.IsWitnessProgram(witnessversion, witnessprogram)) {
1619-
return WitnessSigOps(witnessversion, witnessprogram, witness ? *witness : witnessEmpty, flags);
1619+
return WitnessSigOps(witnessversion, witnessprogram, witness ? *witness : witnessEmpty);
16201620
}
16211621

16221622
if (scriptPubKey.IsPayToScriptHash() && scriptSig.IsPushOnly()) {
@@ -1628,7 +1628,7 @@ size_t CountWitnessSigOps(const CScript& scriptSig, const CScript& scriptPubKey,
16281628
}
16291629
CScript subscript(data.begin(), data.end());
16301630
if (subscript.IsWitnessProgram(witnessversion, witnessprogram)) {
1631-
return WitnessSigOps(witnessversion, witnessprogram, witness ? *witness : witnessEmpty, flags);
1631+
return WitnessSigOps(witnessversion, witnessprogram, witness ? *witness : witnessEmpty);
16321632
}
16331633
}
16341634

0 commit comments

Comments
 (0)