fix self references.

This commit is contained in:
Christopher Jeffrey 2016-02-17 12:32:31 -08:00
parent 9b1effdc66
commit d1b470805e

View File

@ -876,6 +876,7 @@ BlockDB.prototype.hasBlock = function hasBlock(hash, callback) {
};
BlockDB.prototype.hasCoin = function hasCoin(hash, index, callback) {
var self = this;
var id = 'u/t/' + hash + '/' + index;
this.index.get(id, function(err, record) {
@ -895,6 +896,7 @@ BlockDB.prototype.hasCoin = function hasCoin(hash, index, callback) {
};
BlockDB.prototype.hasTX = function hasTX(hash, callback) {
var self = this;
var id = 't/t/' + hash;
this.index.get(id, function(err, record) {