Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
crypticmeta committed Nov 16, 2024
1 parent e248e5f commit 49d9590
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions indexer/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -956,20 +956,20 @@ async function check_db(): Promise<void> {

console.log({ url });

const result = await axios.get(url, {
headers: { Accept: "application/json" },
});
// const result = await axios.get(url, {
// headers: { Accept: "application/json" },
// });

const data = result.data;
// const data = result.data;
// console.log({data})

if(data.inscriptions.length){
await BlockHashes.deleteMany({block_height: {$gt: latest_inscription_block.genesis_height}});
console.log(`Latest Ins and Latest Blockhash height was mismatched so deleted wrong Blockhashes`);
throw Error(
'HEIGHT MISMATCH BETWEEN INSCRIPTION AND BLOCKHASHES'
)
}
// if(data.inscriptions.length){
// await BlockHashes.deleteMany({block_height: {$gt: latest_inscription_block.genesis_height}});
// console.log(`Latest Ins and Latest Blockhash height was mismatched so deleted wrong Blockhashes`);
// throw Error(
// 'HEIGHT MISMATCH BETWEEN INSCRIPTION AND BLOCKHASHES'
// )
// }

}

Expand Down

0 comments on commit 49d9590

Please sign in to comment.