body is actually defined in the function
This commit is contained in:
parent
cc3196085f
commit
d57613bc91
@ -7,7 +7,6 @@ var BufferWriter = require('../lib/bufferwriter');
|
|||||||
//cat blk00000.dat | node blockreader.js
|
//cat blk00000.dat | node blockreader.js
|
||||||
|
|
||||||
var head = null;
|
var head = null;
|
||||||
var body = null;
|
|
||||||
|
|
||||||
process.stdin.on('readable', function() {
|
process.stdin.on('readable', function() {
|
||||||
if (!head) {
|
if (!head) {
|
||||||
@ -22,6 +21,5 @@ process.stdin.on('readable', function() {
|
|||||||
var block = Block().fromBuffer(blockbuf);
|
var block = Block().fromBuffer(blockbuf);
|
||||||
console.log(block.toJSON());
|
console.log(block.toJSON());
|
||||||
head = null;
|
head = null;
|
||||||
body = null;
|
|
||||||
process.stdin.unshift(process.stdin.read());
|
process.stdin.unshift(process.stdin.read());
|
||||||
});
|
});
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user