diff --git a/lib/bcoin/http/rpc.js b/lib/bcoin/http/rpc.js index 832426e4..9cb9002f 100644 --- a/lib/bcoin/http/rpc.js +++ b/lib/bcoin/http/rpc.js @@ -1193,7 +1193,7 @@ RPC.prototype.getblocktemplate = function getblocktemplate(args, callback) { if (block.prevBlock !== self.chain.tip.hash) return callback(new RPCError('inconclusive-not-best-prevblk')); - return self.chain.add(block, function(err) { + return this.chain.add(block, function(err) { if (err) { if (err.reason) return callback(null, err.reason);