diff --git a/lib/server.js b/lib/server.js index 0a9a703..d30bedd 100644 --- a/lib/server.js +++ b/lib/server.js @@ -2448,7 +2448,7 @@ WalletService.prototype._normalizeTxHistory = function(txs) { }); }; -WalletService._cachedBlockheight; +WalletService._cachedBlockheight = {}; WalletService._clearBlockchainHeightCache = function() { WalletService._cachedBlockheight.current = null; }; @@ -2457,7 +2457,6 @@ WalletService.prototype._getBlockchainHeight = function(network, cb) { var self = this; var now = Date.now(); - if (!WalletService._cachedBlockheight) WalletService._cachedBlockheight = {}; var cache = WalletService._cachedBlockheight; function fetchFromBlockchain(cb) {