From 6a5d5c1e485282b92a6d42bcbcbd5c8a396c00d3 Mon Sep 17 00:00:00 2001 From: Christopher Jeffrey Date: Thu, 16 Nov 2017 10:18:26 -0800 Subject: [PATCH] chain: no return await. --- lib/blockchain/chain.js | 8 ++++---- lib/blockchain/chaindb.js | 10 +++++----- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/lib/blockchain/chain.js b/lib/blockchain/chain.js index 21c524f5..e1ae6203 100644 --- a/lib/blockchain/chain.js +++ b/lib/blockchain/chain.js @@ -199,7 +199,7 @@ class Chain extends AsyncEmitter { async _verifyBlock(block) { const flags = common.flags.DEFAULT_FLAGS & ~common.flags.VERIFY_POW; - return await this.verifyContext(block, this.tip, flags); + return this.verifyContext(block, this.tip, flags); } /** @@ -1788,7 +1788,7 @@ class Chain extends AsyncEmitter { if (this.invalid.has(hash)) return true; - return await this.hasEntry(hash); + return this.hasEntry(hash); } /** @@ -2258,7 +2258,7 @@ class Chain extends AsyncEmitter { */ async getCurrentTarget() { - return await this.getTarget(this.network.now(), this.tip); + return this.getTarget(this.network.now(), this.tip); } /** @@ -2545,7 +2545,7 @@ class Chain extends AsyncEmitter { if (this.options.spv) return this.state; - return await this.getDeployments(this.tip.time, prev); + return this.getDeployments(this.tip.time, prev); } /** diff --git a/lib/blockchain/chaindb.js b/lib/blockchain/chaindb.js index 396aa544..e04be88d 100644 --- a/lib/blockchain/chaindb.js +++ b/lib/blockchain/chaindb.js @@ -411,7 +411,7 @@ class ChainDB { assert(height <= entry.height); if (await this.isMainChain(entry)) - return await this.getEntryByHeight(height); + return this.getEntryByHeight(height); while (entry.height !== height) { const cache = this.getPrevCache(entry); @@ -459,7 +459,7 @@ class ChainDB { if (!hash) return null; - return await this.getEntryByHash(hash); + return this.getEntryByHash(hash); } /** @@ -1082,7 +1082,7 @@ class ChainDB { if (!hash) return null; - return await this.db.get(layout.b(hash)); + return this.db.get(layout.b(hash)); } /** @@ -1155,7 +1155,7 @@ class ChainDB { if (!this.options.indexTX) return false; - return await this.db.has(layout.t(hash)); + return this.db.has(layout.t(hash)); } /** @@ -1719,7 +1719,7 @@ class ChainDB { this.del(layout.b(block.hash())); - return await this.disconnectBlock(entry, block); + return this.disconnectBlock(entry, block); } /**