Skip to content

Commit

Permalink
refactor 2
Browse files Browse the repository at this point in the history
  • Loading branch information
danield9tqh committed Nov 20, 2024
1 parent 57ded0e commit b6fe460
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions ironfish/src/wallet/scanner/walletScanner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -323,13 +323,13 @@ export class WalletScanner {

private async getEarliestHead(): Promise<HeadValue | null | 'none'> {
let earliestHead: { sequence: number; hash?: Buffer } | null = null
for (const { scanFrom: head } of this.scanningAccounts) {
if (head === 'cursor') {
for (const { scanFrom } of this.scanningAccounts) {
if (scanFrom === 'cursor') {
continue
}

if (!earliestHead || head.sequence < earliestHead.sequence) {
earliestHead = head
if (!earliestHead || scanFrom.sequence < earliestHead.sequence) {
earliestHead = scanFrom
}
}

Expand Down

0 comments on commit b6fe460

Please sign in to comment.