Ivan Socolsky
9 years ago
No known key found for this signature in database
GPG Key ID: FAECE6A05FAA4F56
1 changed files with
6 additions and
2 deletions
-
lib/server.js
|
|
@ -942,9 +942,13 @@ WalletService.prototype._getUtxosForCurrentWallet = function(addresses, cb) { |
|
|
|
}); |
|
|
|
}, |
|
|
|
function(next) { |
|
|
|
var fromTs = Math.floor(Date.now() / 1000) - 24 * 3600; |
|
|
|
var now = Math.floor(Date.now() / 1000); |
|
|
|
// Fetch latest broadcasted txs and remove any spent inputs from the
|
|
|
|
// list of UTXOs returned by the block explorer. This counteracts any out-of-sync
|
|
|
|
// effects between broadcasting a tx and getting the list of UTXOs.
|
|
|
|
// This is especially true in the case of having multiple instances of the block explorer.
|
|
|
|
self.storage.fetchBroadcastedTxs(self.walletId, { |
|
|
|
minTs: fromTs, |
|
|
|
minTs: now - 24 * 3600, |
|
|
|
limit: 100 |
|
|
|
}, function(err, txs) { |
|
|
|
if (err) return next(err); |
|
|
|