mempool: drop old getCoinView.
This commit is contained in:
parent
3988d2766d
commit
38cfdbf8f9
@ -1618,35 +1618,6 @@ Mempool.prototype.getSpentView = co(function* getSpentView(tx) {
|
||||
}
|
||||
});
|
||||
|
||||
/**
|
||||
* Get coin viewpoint (no lock).
|
||||
* @method
|
||||
* @param {TX} tx
|
||||
* @returns {Promise} - Returns {@link CoinView}.
|
||||
*/
|
||||
|
||||
Mempool.prototype.getCoinView = co(function* getCoinView(tx) {
|
||||
var view = yield this.chain.db.getCoinView(tx);
|
||||
var items = view.toArray();
|
||||
var i, coins, entry;
|
||||
|
||||
for (i = 0; i < items.length; i++) {
|
||||
coins = items[i];
|
||||
|
||||
if (!coins.isEmpty())
|
||||
continue;
|
||||
|
||||
entry = this.getEntry(coins.hash);
|
||||
|
||||
if (!entry)
|
||||
continue;
|
||||
|
||||
view.addTX(entry.tx, -1);
|
||||
}
|
||||
|
||||
return view;
|
||||
});
|
||||
|
||||
/**
|
||||
* Get coin viewpoint (no lock).
|
||||
* @method
|
||||
|
||||
Loading…
Reference in New Issue
Block a user