bitcoind: prevent rapid tip updates for all networks
This commit is contained in:
parent
5bea36edc6
commit
019626ba15
|
@ -322,8 +322,7 @@ Bitcoin.prototype._zmqBlockHandler = function(node, message) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Prevent a rapid succession of updates with regtest
|
// Prevent a rapid succession of updates
|
||||||
if (self.node.network.regtestEnabled) {
|
|
||||||
if (new Date() - self.zmqLastBlock > 1000) {
|
if (new Date() - self.zmqLastBlock > 1000) {
|
||||||
self.zmqLastBlock = new Date();
|
self.zmqLastBlock = new Date();
|
||||||
updateChain();
|
updateChain();
|
||||||
|
@ -333,9 +332,6 @@ Bitcoin.prototype._zmqBlockHandler = function(node, message) {
|
||||||
updateChain();
|
updateChain();
|
||||||
}, 1000);
|
}, 1000);
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
updateChain();
|
|
||||||
}
|
|
||||||
|
|
||||||
// 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++) {
|
||||||
|
|
Loading…
Reference in New Issue