aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZero <zero1729@protonmail.com>2020-09-22 14:38:54 +0100
committerZero <zero1729@protonmail.com>2020-09-22 14:41:15 +0100
commit819d03b932134ee91df3b0fe98a481a331ce57bf (patch)
treecd357cb1493d8b32de23d83bbd4b8701665ef8cf
parented69213c2b2a99023bdee5168614cb8b71990f5f (diff)
downloadbitcoin-819d03b932134ee91df3b0fe98a481a331ce57bf.tar.xz
refactor: took out unused member functions
Took out the following unused member functions: - 'DBHeightKey()' - 'GetType()' - 'operator='
-rw-r--r--src/index/blockfilterindex.cpp1
-rw-r--r--src/script/bitcoinconsensus.cpp7
-rw-r--r--src/test/util_tests.cpp6
3 files changed, 2 insertions, 12 deletions
diff --git a/src/index/blockfilterindex.cpp b/src/index/blockfilterindex.cpp
index 65a5f03a8e..27785fdeb1 100644
--- a/src/index/blockfilterindex.cpp
+++ b/src/index/blockfilterindex.cpp
@@ -51,7 +51,6 @@ struct DBVal {
struct DBHeightKey {
int height;
- DBHeightKey() : height(0) {}
explicit DBHeightKey(int height_in) : height(height_in) {}
template<typename Stream>
diff --git a/src/script/bitcoinconsensus.cpp b/src/script/bitcoinconsensus.cpp
index 15e204062f..76609f01a7 100644
--- a/src/script/bitcoinconsensus.cpp
+++ b/src/script/bitcoinconsensus.cpp
@@ -16,8 +16,7 @@ namespace {
class TxInputStream
{
public:
- TxInputStream(int nTypeIn, int nVersionIn, const unsigned char *txTo, size_t txToLen) :
- m_type(nTypeIn),
+ TxInputStream(int nVersionIn, const unsigned char *txTo, size_t txToLen) :
m_version(nVersionIn),
m_data(txTo),
m_remaining(txToLen)
@@ -47,9 +46,7 @@ public:
}
int GetVersion() const { return m_version; }
- int GetType() const { return m_type; }
private:
- const int m_type;
const int m_version;
const unsigned char* m_data;
size_t m_remaining;
@@ -84,7 +81,7 @@ static int verify_script(const unsigned char *scriptPubKey, unsigned int scriptP
return set_error(err, bitcoinconsensus_ERR_INVALID_FLAGS);
}
try {
- TxInputStream stream(SER_NETWORK, PROTOCOL_VERSION, txTo, txToLen);
+ TxInputStream stream(PROTOCOL_VERSION, txTo, txToLen);
CTransaction tx(deserialize, stream);
if (nIn >= tx.vin.size())
return set_error(err, bitcoinconsensus_ERR_TX_INDEX);
diff --git a/src/test/util_tests.cpp b/src/test/util_tests.cpp
index bf7c6c3e3e..d62ce2da12 100644
--- a/src/test/util_tests.cpp
+++ b/src/test/util_tests.cpp
@@ -1972,12 +1972,6 @@ struct Tracker
copies = t.copies + 1;
return *this;
}
- Tracker& operator=(Tracker&& t) noexcept
- {
- origin = t.origin;
- copies = t.copies;
- return *this;
- }
};
}