refactor fn names

This commit is contained in:
Ivan Socolsky 2017-04-20 15:41:15 -03:00
parent 13472e147a
commit 0dbdfa1857
No known key found for this signature in database
GPG Key ID: FAECE6A05FAA4F56
1 changed files with 5 additions and 5 deletions

View File

@ -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) {