Skip to content

Commit 819d03b

Browse files
committed
refactor: took out unused member functions
Took out the following unused member functions: - 'DBHeightKey()' - 'GetType()' - 'operator='
1 parent ed69213 commit 819d03b

File tree

3 files changed

+2
-12
lines changed

3 files changed

+2
-12
lines changed

src/index/blockfilterindex.cpp

-1
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,6 @@ struct DBVal {
5151
struct DBHeightKey {
5252
int height;
5353

54-
DBHeightKey() : height(0) {}
5554
explicit DBHeightKey(int height_in) : height(height_in) {}
5655

5756
template<typename Stream>

src/script/bitcoinconsensus.cpp

+2-5
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,7 @@ namespace {
1616
class TxInputStream
1717
{
1818
public:
19-
TxInputStream(int nTypeIn, int nVersionIn, const unsigned char *txTo, size_t txToLen) :
20-
m_type(nTypeIn),
19+
TxInputStream(int nVersionIn, const unsigned char *txTo, size_t txToLen) :
2120
m_version(nVersionIn),
2221
m_data(txTo),
2322
m_remaining(txToLen)
@@ -47,9 +46,7 @@ class TxInputStream
4746
}
4847

4948
int GetVersion() const { return m_version; }
50-
int GetType() const { return m_type; }
5149
private:
52-
const int m_type;
5350
const int m_version;
5451
const unsigned char* m_data;
5552
size_t m_remaining;
@@ -84,7 +81,7 @@ static int verify_script(const unsigned char *scriptPubKey, unsigned int scriptP
8481
return set_error(err, bitcoinconsensus_ERR_INVALID_FLAGS);
8582
}
8683
try {
87-
TxInputStream stream(SER_NETWORK, PROTOCOL_VERSION, txTo, txToLen);
84+
TxInputStream stream(PROTOCOL_VERSION, txTo, txToLen);
8885
CTransaction tx(deserialize, stream);
8986
if (nIn >= tx.vin.size())
9087
return set_error(err, bitcoinconsensus_ERR_TX_INDEX);

src/test/util_tests.cpp

-6
Original file line numberDiff line numberDiff line change
@@ -1972,12 +1972,6 @@ struct Tracker
19721972
copies = t.copies + 1;
19731973
return *this;
19741974
}
1975-
Tracker& operator=(Tracker&& t) noexcept
1976-
{
1977-
origin = t.origin;
1978-
copies = t.copies;
1979-
return *this;
1980-
}
19811975
};
19821976

19831977
}

0 commit comments

Comments
 (0)