add comment
This commit is contained in:
parent
3d7a12f3ab
commit
b7bc041f79
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue