Skip to content

Commit

Permalink
encoding: refactor int64 handling.
Browse files Browse the repository at this point in the history
  • Loading branch information
chjj committed Sep 6, 2017
1 parent 79d1bbd commit b816434
Show file tree
Hide file tree
Showing 8 changed files with 80 additions and 319 deletions.
6 changes: 3 additions & 3 deletions lib/blockchain/chaindb.js
Original file line number Diff line number Diff line change
Expand Up @@ -2105,9 +2105,9 @@ ChainState.fromRaw = function fromRaw(data) {
const state = new ChainState();
const br = new BufferReader(data);
state.tip = br.readHash();
state.tx = br.readU53();
state.coin = br.readU53();
state.value = br.readU53();
state.tx = br.readU64();
state.coin = br.readU64();
state.value = br.readU64();
return state;
};

Expand Down
4 changes: 2 additions & 2 deletions lib/net/packets.js
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@ VersionPacket.prototype.fromReader = function fromReader(br) {
// are currently unused.
br.readU32();

this.time = br.readI53();
this.time = br.readI64();
this.remote.fromReader(br, false);

if (br.left() > 0) {
Expand Down Expand Up @@ -2209,7 +2209,7 @@ SendCmpctPacket.prototype.toRaw = function toRaw() {

SendCmpctPacket.prototype.fromReader = function fromReader(br) {
this.mode = br.readU8();
this.version = br.readU53();
this.version = br.readU64();
return this;
};

Expand Down
Loading

0 comments on commit b816434

Please sign in to comment.