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() {
|
||||
return {
|
||||
hash: this.hash,
|
||||
version: this.version,
|
||||
prevHash: this.prevHash,
|
||||
merkleRoot: this.merkleRoot,
|
||||
|
||||
@ -234,7 +234,7 @@ DB.prototype.blockHandler = function(block, add, callback) {
|
||||
|
||||
// Notify block subscribers
|
||||
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(
|
||||
|
||||
Loading…
Reference in New Issue
Block a user