http: fix get block call. fixes #208.
This commit is contained in:
parent
c81d57c25c
commit
cecf2c7789
@ -274,6 +274,7 @@ HTTPServer.prototype.initRouter = function initRouter() {
|
|||||||
'Hash or height required.');
|
'Hash or height required.');
|
||||||
enforce(!this.chain.options.spv, 'Cannot get block in SPV mode.');
|
enforce(!this.chain.options.spv, 'Cannot get block in SPV mode.');
|
||||||
|
|
||||||
|
hash = util.revHex(hash);
|
||||||
block = yield this.chain.db.getBlock(hash);
|
block = yield this.chain.db.getBlock(hash);
|
||||||
|
|
||||||
if (!block) {
|
if (!block) {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user