Skip to content

Commit

Permalink
puts 'loadHeads' back
Browse files Browse the repository at this point in the history
it's used in the 'debug' CLI command
  • Loading branch information
hughy committed Nov 13, 2024
1 parent 478abfa commit 81530ef
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions ironfish/src/wallet/walletdb/walletdb.ts
Original file line number Diff line number Diff line change
Expand Up @@ -482,6 +482,14 @@ export class WalletDB {
await this.heads.del(account.id, tx)
}

async *loadHeads(
tx?: IDatabaseTransaction,
): AsyncGenerator<{ accountId: string; head: HeadValue | null }, void, unknown> {
for await (const [accountId, head] of this.heads.getAllIter(tx)) {
yield { accountId, head }
}
}

async saveTransaction(
account: Account,
transactionHash: Buffer,
Expand Down

0 comments on commit 81530ef

Please sign in to comment.