Skip to content

Commit

Permalink
chain: remove unnecessary critical error.
Browse files Browse the repository at this point in the history
  • Loading branch information
nodech committed Nov 8, 2023
1 parent 6446828 commit 9df05ac
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions lib/blockchain/chain.js
Original file line number Diff line number Diff line change
Expand Up @@ -1006,11 +1006,8 @@ class Chain extends AsyncEmitter {
const ns = await view.getNameState(this.db, nameHash);

if (ns.isNull()) {
if (!covenant.isClaim() && !covenant.isOpen()) {
const error = new CriticalError('Database inconsistency.');
this.emit('abort', error);
throw error;
}
if (!covenant.isClaim() && !covenant.isOpen())
throw new Error('Database inconsistency.');

const name = covenant.get(2);
ns.set(name, height);
Expand Down

0 comments on commit 9df05ac

Please sign in to comment.