From f48fa2b994ebd9f2bebc39f87f252252881dc860 Mon Sep 17 00:00:00 2001 From: Christopher Jeffrey Date: Mon, 16 May 2016 04:57:31 -0700 Subject: [PATCH] safe priority serialization. --- lib/bcoin/mempool.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/bcoin/mempool.js b/lib/bcoin/mempool.js index a8fdaeae..878c4c73 100644 --- a/lib/bcoin/mempool.js +++ b/lib/bcoin/mempool.js @@ -1825,7 +1825,7 @@ MempoolEntry.prototype.toRaw = function toRaw() { var p = new BufferWriter(); bcoin.protocol.framer.tx(this.tx, p); p.writeU32(this.height); - p.writeVarint(this.priority); + p.writeU64(this.priority); p.writeVarint(this.chainValue); p.writeU32(this.ts); p.writeU32(this.count); @@ -1845,7 +1845,7 @@ MempoolEntry.fromRaw = function fromRaw(data) { return new MempoolEntry({ tx: bcoin.tx.fromRaw(p), height: p.readU32(), - priority: p.readVarint(), + priority: p.readU53(), chainValue: p.readVarint(), ts: p.readU32(), count: p.readU32(),