peer: have updateWatch getblocks instead of filterload for the satoshi option.
This commit is contained in:
parent
024350dbe4
commit
a3b923ae76
@ -161,7 +161,19 @@ Peer.prototype.broadcast = function broadcast(items) {
|
||||
};
|
||||
|
||||
Peer.prototype.updateWatch = function updateWatch() {
|
||||
if (this.options.satoshi) return;
|
||||
if (this.options.satoshi) {
|
||||
if (this.ack) {
|
||||
var self = this;
|
||||
if (this.pool.block.lastHash)
|
||||
this.loadBlocks([ self.pool.block.lastHash ], 0);
|
||||
else
|
||||
this.pool.chain.getLast(function(hash) {
|
||||
self.loadBlocks([ hash ], 0);
|
||||
});
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
if (this.ack)
|
||||
this._write(this.framer.filterLoad(this.bloom, 'none'));
|
||||
};
|
||||
|
||||
Loading…
Reference in New Issue
Block a user