Adding function to delete cache for a given addr
Adding _deleteCache: deletes the cache for given address (useful for dev purposes or to recalculate caches)
This commit is contained in:
parent
4d023760ad
commit
6beb2ecd06
@ -495,6 +495,17 @@ AddressService.prototype._loadCache = function(address, result, useCache, next)
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
AddressService.prototype._deleteCache = function(address, callback) {
|
||||||
|
const self = this;
|
||||||
|
var key = self._encoding.encodeAddressCacheKey(address);
|
||||||
|
|
||||||
|
if(!_.isFunction(callback)) //if callback is not passed, call a empty function
|
||||||
|
callback = () => null;
|
||||||
|
|
||||||
|
self._db.del(key, callback);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
AddressService.prototype._setOutputResults = function(tx, address, result) {
|
AddressService.prototype._setOutputResults = function(tx, address, result) {
|
||||||
|
|
||||||
for(var j = 0; j < tx.outputs.length; j++) {
|
for(var j = 0; j < tx.outputs.length; j++) {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user