mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-06-14 19:02:43 +02:00
refactor: took out unused member functions
Took out the following unused member functions: - 'DBHeightKey()' - 'GetType()' - 'operator='
This commit is contained in:
parent
ed69213c2b
commit
819d03b932
@ -51,7 +51,6 @@ struct DBVal {
|
|||||||
struct DBHeightKey {
|
struct DBHeightKey {
|
||||||
int height;
|
int height;
|
||||||
|
|
||||||
DBHeightKey() : height(0) {}
|
|
||||||
explicit DBHeightKey(int height_in) : height(height_in) {}
|
explicit DBHeightKey(int height_in) : height(height_in) {}
|
||||||
|
|
||||||
template<typename Stream>
|
template<typename Stream>
|
||||||
|
@ -16,8 +16,7 @@ namespace {
|
|||||||
class TxInputStream
|
class TxInputStream
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
TxInputStream(int nTypeIn, int nVersionIn, const unsigned char *txTo, size_t txToLen) :
|
TxInputStream(int nVersionIn, const unsigned char *txTo, size_t txToLen) :
|
||||||
m_type(nTypeIn),
|
|
||||||
m_version(nVersionIn),
|
m_version(nVersionIn),
|
||||||
m_data(txTo),
|
m_data(txTo),
|
||||||
m_remaining(txToLen)
|
m_remaining(txToLen)
|
||||||
@ -47,9 +46,7 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
int GetVersion() const { return m_version; }
|
int GetVersion() const { return m_version; }
|
||||||
int GetType() const { return m_type; }
|
|
||||||
private:
|
private:
|
||||||
const int m_type;
|
|
||||||
const int m_version;
|
const int m_version;
|
||||||
const unsigned char* m_data;
|
const unsigned char* m_data;
|
||||||
size_t m_remaining;
|
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);
|
return set_error(err, bitcoinconsensus_ERR_INVALID_FLAGS);
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
TxInputStream stream(SER_NETWORK, PROTOCOL_VERSION, txTo, txToLen);
|
TxInputStream stream(PROTOCOL_VERSION, txTo, txToLen);
|
||||||
CTransaction tx(deserialize, stream);
|
CTransaction tx(deserialize, stream);
|
||||||
if (nIn >= tx.vin.size())
|
if (nIn >= tx.vin.size())
|
||||||
return set_error(err, bitcoinconsensus_ERR_TX_INDEX);
|
return set_error(err, bitcoinconsensus_ERR_TX_INDEX);
|
||||||
|
@ -1972,12 +1972,6 @@ struct Tracker
|
|||||||
copies = t.copies + 1;
|
copies = t.copies + 1;
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
Tracker& operator=(Tracker&& t) noexcept
|
|
||||||
{
|
|
||||||
origin = t.origin;
|
|
||||||
copies = t.copies;
|
|
||||||
return *this;
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user