http: fix get block call. fixes #208.

This commit is contained in:
Christopher Jeffrey 2017-05-12 11:43:02 -07:00
parent c81d57c25c
commit cecf2c7789
No known key found for this signature in database
GPG Key ID: 8962AB9DE6666BBD

View File

@ -274,6 +274,7 @@ HTTPServer.prototype.initRouter = function initRouter() {
'Hash or height required.');
enforce(!this.chain.options.spv, 'Cannot get block in SPV mode.');
hash = util.revHex(hash);
block = yield this.chain.db.getBlock(hash);
if (!block) {