fix block subscription
This commit is contained in:
parent
d6d9c6a975
commit
eacb04f4f9
@ -50,6 +50,7 @@ Block.fromBufferReader = function(br) {
|
|||||||
|
|
||||||
Block.prototype.toObject = Block.prototype.toJSON = function() {
|
Block.prototype.toObject = Block.prototype.toJSON = function() {
|
||||||
return {
|
return {
|
||||||
|
hash: this.hash,
|
||||||
version: this.version,
|
version: this.version,
|
||||||
prevHash: this.prevHash,
|
prevHash: this.prevHash,
|
||||||
merkleRoot: this.merkleRoot,
|
merkleRoot: this.merkleRoot,
|
||||||
|
|||||||
@ -234,7 +234,7 @@ DB.prototype.blockHandler = function(block, add, callback) {
|
|||||||
|
|
||||||
// Notify block subscribers
|
// Notify block subscribers
|
||||||
for(var i = 0; i < this.subscriptions.block.length; i++) {
|
for(var i = 0; i < this.subscriptions.block.length; i++) {
|
||||||
this.subscriptions.transaction[i].emit('block', block.hash);
|
this.subscriptions.block[i].emit('block', block.hash);
|
||||||
}
|
}
|
||||||
|
|
||||||
async.eachSeries(
|
async.eachSeries(
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user