Skip to content

Commit

Permalink
Merge #13025: Dead code removal
Browse files Browse the repository at this point in the history
1bf3f33 node: Removed unused wallet-related methods from the Node interface. (Thomas Snider)
b382004 benchmark: Removed bench/perf.cpp (Thomas Snider)

Pull request description:

  Not sure if these should be separate PRs.

  First is removal of a platform abstraction for getting cycle counters where possible.  Since the benchmarking switch to counting number of iterations over a fixed window instead of counting cycles per iteration, these are unused.

  Second is removal of a few methods from the Node interface that seem vestigial from when the concepts of wallet/node were not as clearly separated.

Tree-SHA512: de1460a7d4473ca19db4e2ca845185c63c765d12462c2685044a1f27dedab266cd908bc52235a881a7ad98bc251a4abf4eae523e5f599c169e3511e489f19a0d
  • Loading branch information
MarcoFalke committed Apr 19, 2018
2 parents 615f7c2 + 1bf3f33 commit 39cf27f
Show file tree
Hide file tree
Showing 6 changed files with 0 additions and 108 deletions.
2 changes: 0 additions & 2 deletions src/Makefile.bench.include
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@ bench_bench_bitcoin_SOURCES = \
bench/verify_script.cpp \
bench/base58.cpp \
bench/lockedpool.cpp \
bench/perf.cpp \
bench/perf.h \
bench/prevector.cpp

nodist_bench_bench_bitcoin_SOURCES = $(GENERATED_BENCH_FILES)
Expand Down
4 changes: 0 additions & 4 deletions src/bench/bench.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
// file COPYING or http://www.opensource.org/licenses/mit-license.php.

#include <bench/bench.h>
#include <bench/perf.h>

#include <assert.h>
#include <iostream>
Expand Down Expand Up @@ -96,7 +95,6 @@ benchmark::BenchRunner::BenchRunner(std::string name, benchmark::BenchFunction f

void benchmark::BenchRunner::RunAll(Printer& printer, uint64_t num_evals, double scaling, const std::string& filter, bool is_list_only)
{
perf_init();
if (!std::ratio_less_equal<benchmark::clock::period, std::micro>::value) {
std::cerr << "WARNING: Clock precision is worse than microsecond - benchmarks may be less accurate!\n";
}
Expand Down Expand Up @@ -126,8 +124,6 @@ void benchmark::BenchRunner::RunAll(Printer& printer, uint64_t num_evals, double
}

printer.footer();

perf_fini();
}

bool benchmark::State::UpdateTimer(const benchmark::time_point current_time)
Expand Down
53 changes: 0 additions & 53 deletions src/bench/perf.cpp

This file was deleted.

37 changes: 0 additions & 37 deletions src/bench/perf.h

This file was deleted.

3 changes: 0 additions & 3 deletions src/interfaces/node.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -216,9 +216,6 @@ class NodeImpl : public Node
return result;
}
CFeeRate getDustRelayFee() override { return ::dustRelayFee; }
CFeeRate getFallbackFee() override { CHECK_WALLET(return CWallet::fallbackFee); }
CFeeRate getPayTxFee() override { CHECK_WALLET(return ::payTxFee); }
void setPayTxFee(CFeeRate rate) override { CHECK_WALLET(::payTxFee = rate); }
UniValue executeRpc(const std::string& command, const UniValue& params, const std::string& uri) override
{
JSONRPCRequest req;
Expand Down
9 changes: 0 additions & 9 deletions src/interfaces/node.h
Original file line number Diff line number Diff line change
Expand Up @@ -173,15 +173,6 @@ class Node
//! Get dust relay fee.
virtual CFeeRate getDustRelayFee() = 0;

//! Get fallback fee.
virtual CFeeRate getFallbackFee() = 0;

//! Get pay tx fee.
virtual CFeeRate getPayTxFee() = 0;

//! Set pay tx fee.
virtual void setPayTxFee(CFeeRate rate) = 0;

//! Execute rpc command.
virtual UniValue executeRpc(const std::string& command, const UniValue& params, const std::string& uri) = 0;

Expand Down

0 comments on commit 39cf27f

Please sign in to comment.