rpc: fix findFork.

This commit is contained in:
Christopher Jeffrey 2016-08-09 21:14:30 -07:00
parent 242fbd0a59
commit cfee08d58e
No known key found for this signature in database
GPG Key ID: 8962AB9DE6666BBD

View File

@ -986,6 +986,12 @@ RPC.prototype.getchaintips = function getchaintips(args, callback) {
RPC.prototype._findFork = function _findFork(entry, callback) {
(function next(err, entry) {
if (err)
return callback(err);
if (!entry)
return callback(new Error('Fork not found.'));
entry.isMainChain(function(err, main) {
if (err)
return callback(err);