Browse Source

update blockreader example to use toJSON

patch-2
Ryan X. Charles 10 years ago
parent
commit
04887db261
  1. 2
      examples/blockreader.js

2
examples/blockreader.js

@ -16,5 +16,5 @@ process.stdin.on('end', function(buf) {
var blocksbuf = bw.concat();
var br = new BufferReader(blocksbuf);
while (!br.eof())
console.log(Block().fromBufferReader(br));
console.log(JSON.stringify(Block().fromBufferReader(br).toJSON(), null, 2));
});

Loading…
Cancel
Save