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
|
||||
if (self.node.network.regtestEnabled) {
|
||||
// Prevent a rapid succession of updates
|
||||
if (new Date() - self.zmqLastBlock > 1000) {
|
||||
self.zmqLastBlock = new Date();
|
||||
updateChain();
|
||||
|
@ -333,9 +332,6 @@ Bitcoin.prototype._zmqBlockHandler = function(node, message) {
|
|||
updateChain();
|
||||
}, 1000);
|
||||
}
|
||||
} else {
|
||||
updateChain();
|
||||
}
|
||||
|
||||
// Notify block subscribers
|
||||
for (var i = 0; i < this.subscriptions.block.length; i++) {
|
||||
|
|
Loading…
Reference in New Issue