Skip to content

Commit

Permalink
Simplify attribute key uint32 migration (#1200)
Browse files Browse the repository at this point in the history
Signed-off-by: Anthony Fieroni <[email protected]>
  • Loading branch information
bvbfan authored Apr 15, 2022
1 parent e7b0107 commit d20330d
Showing 1 changed file with 1 addition and 12 deletions.
13 changes: 1 addition & 12 deletions src/masternodes/govvariables/attributes.h
Original file line number Diff line number Diff line change
Expand Up @@ -79,18 +79,7 @@ struct CDataStructureV0 {
inline void SerializationOp(Stream& s, Operation ser_action) {
READWRITE(type);
READWRITE(typeId);
if (ser_action.ForRead()) {
// Check if next key is 8bit or extended size 8bit + 32bit
if (s.size() == sizeof(uint8_t) || s.size() == sizeof(uint8_t) + sizeof(uint32_t)) {
uint8_t key8;
READWRITE(key8);
key = key8;
} else {
READWRITE(key);
}
} else {
READWRITE(key);
}
READWRITE(VARINT(key));
if (IsExtendedSize()) {
READWRITE(keyId);
} else {
Expand Down

0 comments on commit d20330d

Please sign in to comment.