Skip to content

Commit

Permalink
fix: mn entry version deserialization
Browse files Browse the repository at this point in the history
  • Loading branch information
shumkov committed Jul 5, 2024
1 parent 5a3ddfc commit aa4f73e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/deterministicmnlist/SimplifiedMNListEntry.js
Original file line number Diff line number Diff line change
Expand Up @@ -113,8 +113,11 @@ SimplifiedMNListEntry.fromBuffer = function fromBuffer(buffer, network) {
object.nType = bufferReader.readUInt16LE();
}

if (object.nType === MASTERNODE_TYPE_HP) {
if (typeof object.nType === 'number') {
object.nVersion = 2;
}

if (object.nType === MASTERNODE_TYPE_HP) {
object.platformHTTPPort = bufferReader.readUInt16LE();
object.platformNodeID = bufferReader.read(PLATFORM_NODE_ID_SIZE).reverse().toString('hex');
}
Expand Down

0 comments on commit aa4f73e

Please sign in to comment.