more packet improvements.
This commit is contained in:
parent
077588e90a
commit
bfca638025
@ -354,6 +354,9 @@ Framer.block = function _block(block, type) {
|
||||
// flags
|
||||
for (i = 0; i < block.flags.length; i++)
|
||||
p[off++] = block.flags[i];
|
||||
} else if (type === 'header') {
|
||||
// txn_count
|
||||
off += utils.writeIntv(p, block.txs.length, off);
|
||||
} else {
|
||||
// txn_count
|
||||
off += utils.writeIntv(p, block.txs.length, off);
|
||||
|
||||
@ -306,7 +306,7 @@ Parser.prototype.parseHeaders = function parseHeaders(p) {
|
||||
for (i = 0; i < count; i++) {
|
||||
header = {};
|
||||
start = off;
|
||||
header.version = readU32(p, off);
|
||||
header.version = utils.read32(p, off);
|
||||
off += 4;
|
||||
header.prevBlock = utils.toArray(p.slice(off, off + 32));
|
||||
off += 32;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user