|
|
@ -88,7 +88,7 @@ BlockchainMonitor.prototype._initExplorer = function(explorer) { |
|
|
|
socket.on('block', _.bind(self._handleNewBlock, self, explorer.network)); |
|
|
|
}; |
|
|
|
|
|
|
|
BlockchainMonitor.prototype._handleTxId = function(data, processIt) { |
|
|
|
BlockchainMonitor.prototype._handleThirdPartyBroadcasts = function(data, processIt) { |
|
|
|
var self = this; |
|
|
|
if (!data || !data.txid) return; |
|
|
|
|
|
|
@ -103,7 +103,7 @@ BlockchainMonitor.prototype._handleTxId = function(data, processIt) { |
|
|
|
|
|
|
|
if (!processIt) { |
|
|
|
log.info('Detected broadcast ' + data.txid + ' of an accepted txp [' + txp.id + '] for wallet ' + walletId + ' [' + txp.amount + 'sat ]'); |
|
|
|
return setTimeout(self._handleTxId.bind(self, data, true), 20 * 1000); |
|
|
|
return setTimeout(self._handleThirdPartyBroadcasts.bind(self, data, true), 20 * 1000); |
|
|
|
} |
|
|
|
|
|
|
|
log.info('Processing accepted txp [' + txp.id + '] for wallet ' + walletId + ' [' + txp.amount + 'sat ]'); |
|
|
@ -134,7 +134,7 @@ BlockchainMonitor.prototype._handleTxId = function(data, processIt) { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
BlockchainMonitor.prototype._handleTxOuts = function(data) { |
|
|
|
BlockchainMonitor.prototype._handleIncomingPayments = function(data) { |
|
|
|
var self = this; |
|
|
|
|
|
|
|
if (!data || !data.vout) return; |
|
|
@ -204,8 +204,8 @@ BlockchainMonitor.prototype._updateActiveAddresses = function(address, cb) { |
|
|
|
}; |
|
|
|
|
|
|
|
BlockchainMonitor.prototype._handleIncomingTx = function(data) { |
|
|
|
this._handleTxId(data); |
|
|
|
this._handleTxOuts(data); |
|
|
|
this._handleThirdPartyBroadcasts(data); |
|
|
|
this._handleIncomingPayments(data); |
|
|
|
}; |
|
|
|
|
|
|
|
BlockchainMonitor.prototype._handleNewBlock = function(network, hash) { |
|
|
|