mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-04-29 23:09:44 -04:00
Add override/final modifiers to V1TransportDeserializer
This commit is contained in:
parent
f342a5e61a
commit
ed2dc5e48a
1 changed files with 5 additions and 5 deletions
10
src/net.h
10
src/net.h
|
@ -649,7 +649,7 @@ public:
|
||||||
virtual ~TransportDeserializer() {}
|
virtual ~TransportDeserializer() {}
|
||||||
};
|
};
|
||||||
|
|
||||||
class V1TransportDeserializer : public TransportDeserializer
|
class V1TransportDeserializer final : public TransportDeserializer
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
mutable CHash256 hasher;
|
mutable CHash256 hasher;
|
||||||
|
@ -682,23 +682,23 @@ public:
|
||||||
Reset();
|
Reset();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Complete() const
|
bool Complete() const override
|
||||||
{
|
{
|
||||||
if (!in_data)
|
if (!in_data)
|
||||||
return false;
|
return false;
|
||||||
return (hdr.nMessageSize == nDataPos);
|
return (hdr.nMessageSize == nDataPos);
|
||||||
}
|
}
|
||||||
void SetVersion(int nVersionIn)
|
void SetVersion(int nVersionIn) override
|
||||||
{
|
{
|
||||||
hdrbuf.SetVersion(nVersionIn);
|
hdrbuf.SetVersion(nVersionIn);
|
||||||
vRecv.SetVersion(nVersionIn);
|
vRecv.SetVersion(nVersionIn);
|
||||||
}
|
}
|
||||||
int Read(const char *pch, unsigned int nBytes) {
|
int Read(const char *pch, unsigned int nBytes) override {
|
||||||
int ret = in_data ? readData(pch, nBytes) : readHeader(pch, nBytes);
|
int ret = in_data ? readData(pch, nBytes) : readHeader(pch, nBytes);
|
||||||
if (ret < 0) Reset();
|
if (ret < 0) Reset();
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
CNetMessage GetMessage(const CMessageHeader::MessageStartChars& message_start, int64_t time);
|
CNetMessage GetMessage(const CMessageHeader::MessageStartChars& message_start, int64_t time) override;
|
||||||
};
|
};
|
||||||
|
|
||||||
/** Information about a peer */
|
/** Information about a peer */
|
||||||
|
|
Loading…
Add table
Reference in a new issue