Skip to content

Commit

Permalink
Merge PR #873 from 'nodech/remove-critical'
Browse files Browse the repository at this point in the history
  • Loading branch information
nodech committed Nov 9, 2023
1 parent b539dea commit 86d8f6f
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 86d8f6f

Please sign in to comment.