Skip to content

Commit

Permalink
test check
Browse files Browse the repository at this point in the history
  • Loading branch information
summraznboi committed Apr 13, 2024
1 parent 224f7d1 commit bc503fc
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/indexer/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ export class RunestoneIndexer {
const newBlockhashesToIndex: string[] = [];

const currentStorageBlock = await this._storage.getCurrentBlock();
if (currentStorageBlock != null) {
if (currentStorageBlock !== null) {
// If rpc block indexing is ahead of our storage, let's save up all block hashes
// until we arrive back to the current storage's block tip.
const bestblockhashResult = await this._rpc.getbestblockhash();
Expand Down
8 changes: 6 additions & 2 deletions src/indexer/updater.ts
Original file line number Diff line number Diff line change
Expand Up @@ -455,8 +455,12 @@ export class RuneUpdater implements RuneBlockIndex {
continue;
}

const inscructions = script.decompile(witnessStack[lastWitnessElement.length - offset]);
for (const instruction of inscructions) {
const potentiallyTapscript = witnessStack[lastWitnessElement.length - offset];
if (potentiallyTapscript === undefined) {
continue;
}
const instructions = script.decompile(potentiallyTapscript);
for (const instruction of instructions) {
if (!Buffer.isBuffer(instruction)) {
continue;
}
Expand Down
2 changes: 1 addition & 1 deletion test/updater.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { BitcoinRpcClient } from '../src/rpcclient';
import { Network } from '../src/network';
import { MAGIC_EDEN_OUTPUT, getDeployRunestoneHex } from './fixtures';
import { OP_RETURN, TAPROOT_SCRIPT_PUBKEY_TYPE } from '../src/constants';
import _ from 'lodash';
import * as _ from 'lodash';

function getDefaultRuneUpdaterContext() {
const block = {
Expand Down

0 comments on commit bc503fc

Please sign in to comment.