diff options
author | Cory Fields <cory-nospam-@coryfields.com> | 2023-09-07 15:20:24 +0000 |
---|---|---|
committer | Cory Fields <cory-nospam-@coryfields.com> | 2023-09-08 13:40:15 +0000 |
commit | f15f790618d328abd207d55e6291229eb2a8643f (patch) | |
tree | 625d6ca78876002bf0849ed808004e762cf05828 /src/primitives | |
parent | 8e0d9796da8cfb6c4e918788a03eea125d0633a6 (diff) | |
download | bitcoin-f15f790618d328abd207d55e6291229eb2a8643f.tar.xz |
Remove version/hashing options from CBlockLocator/CDiskBlockIndex
Diffstat (limited to 'src/primitives')
-rw-r--r-- | src/primitives/block.h | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/src/primitives/block.h b/src/primitives/block.h index 861d362414..99accfc7dd 100644 --- a/src/primitives/block.h +++ b/src/primitives/block.h @@ -118,6 +118,15 @@ public: */ struct CBlockLocator { + /** Historically CBlockLocator's version field has been written to network + * streams as the negotiated protocol version and to disk streams as the + * client version, but the value has never been used. + * + * Hard-code to the highest protocol version ever written to a network stream. + * SerParams can be used if the field requires any meaning in the future, + **/ + static constexpr int DUMMY_VERSION = 70016; + std::vector<uint256> vHave; CBlockLocator() {} @@ -126,9 +135,8 @@ struct CBlockLocator SERIALIZE_METHODS(CBlockLocator, obj) { - int nVersion = s.GetVersion(); - if (!(s.GetType() & SER_GETHASH)) - READWRITE(nVersion); + int nVersion = DUMMY_VERSION; + READWRITE(nVersion); READWRITE(obj.vHave); } |