Browse Source

If skipMagic is enabled do not set the magic or size on the block, the values would have been incorrect.

patch-2
Braydon Fuller 10 years ago
parent
commit
116ddac345
  1. 4
      lib/block.js

4
lib/block.js

@ -114,10 +114,6 @@ Block._fromBufferReader = function _fromBufferReader(br, options) {
info.size = br.readUInt32LE();
}
info.header = BlockHeader.fromBufferReader(br);
if (options.skipMagic) {
info.magicnum = 0;
info.size = info.header.bits;
}
var transactions = br.readVarintNum();
info.transactions = [];
for (var i = 0; i < transactions; i++) {

Loading…
Cancel
Save