chain: no return await.

This commit is contained in:
Christopher Jeffrey 2017-11-16 10:18:26 -08:00
parent 3565d5dfe7
commit 6a5d5c1e48
No known key found for this signature in database
GPG Key ID: 8962AB9DE6666BBD
2 changed files with 9 additions and 9 deletions

View File

@ -199,7 +199,7 @@ class Chain extends AsyncEmitter {
async _verifyBlock(block) { async _verifyBlock(block) {
const flags = common.flags.DEFAULT_FLAGS & ~common.flags.VERIFY_POW; 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)) if (this.invalid.has(hash))
return true; return true;
return await this.hasEntry(hash); return this.hasEntry(hash);
} }
/** /**
@ -2258,7 +2258,7 @@ class Chain extends AsyncEmitter {
*/ */
async getCurrentTarget() { 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) if (this.options.spv)
return this.state; return this.state;
return await this.getDeployments(this.tip.time, prev); return this.getDeployments(this.tip.time, prev);
} }
/** /**

View File

@ -411,7 +411,7 @@ class ChainDB {
assert(height <= entry.height); assert(height <= entry.height);
if (await this.isMainChain(entry)) if (await this.isMainChain(entry))
return await this.getEntryByHeight(height); return this.getEntryByHeight(height);
while (entry.height !== height) { while (entry.height !== height) {
const cache = this.getPrevCache(entry); const cache = this.getPrevCache(entry);
@ -459,7 +459,7 @@ class ChainDB {
if (!hash) if (!hash)
return null; return null;
return await this.getEntryByHash(hash); return this.getEntryByHash(hash);
} }
/** /**
@ -1082,7 +1082,7 @@ class ChainDB {
if (!hash) if (!hash)
return null; 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) if (!this.options.indexTX)
return false; 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())); this.del(layout.b(block.hash()));
return await this.disconnectBlock(entry, block); return this.disconnectBlock(entry, block);
} }
/** /**