Skip to content

Backend panic errors#4150

Merged
benma merged 5 commits into
BitBoxSwiss:masterfrom
benma:backend-panic-errors
May 30, 2026
Merged

Backend panic errors#4150
benma merged 5 commits into
BitBoxSwiss:masterfrom
benma:backend-panic-errors

Conversation

@benma
Copy link
Copy Markdown
Contributor

@benma benma commented May 16, 2026

Before asking for reviews, here is a check list of the most common things you might need to consider:

  • updating the Changelog
  • writing unit tests
  • checking if your changes affect other coins or tokens in unintended ways
  • testing on multiple environments (Qt, Android, ...)
  • having an AI review your changes

@benma benma force-pushed the backend-panic-errors branch from b9f9352 to 62c6b6f Compare May 28, 2026 03:01
@benma benma requested a review from bznein May 28, 2026 03:01
@benma benma marked this pull request as ready for review May 28, 2026 03:01
@benma benma requested a review from a team as a code owner May 28, 2026 03:01
Copy link
Copy Markdown
Collaborator

@bznein bznein left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM with just a couple of nits

Comment on lines +404 to 407
if err := headers.reorg(db, tip); err != nil {
return err
}
return nil
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could aldo just be return headers.reorg(db,tip) but either is fine

return headerTimestamp
}

func (transactions *Transactions) processTxForAddress(
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe add a comment to explain the returned value? It's a bit confusing for a function named processX to also return a mysterious boolean

return input != nil, nil
}

func (transactions *Transactions) removeTxForAddress(
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe also here a comment explaining the returned bool?

benma added 5 commits May 30, 2026 11:58
Transaction history updates used to publish notifier events and start transaction
verification while the database update transaction was still open. If a later DB
operation failed and rolled back, the app could notify listeners or verify
transactions that were never committed.

Collect the notifier and verification work during the DB update and run it only
after DBUpdate returns successfully.
@benma benma force-pushed the backend-panic-errors branch from 62c6b6f to dcd56e5 Compare May 30, 2026 09:58
@benma benma merged commit f0240b5 into BitBoxSwiss:master May 30, 2026
11 checks passed
@benma benma deleted the backend-panic-errors branch May 30, 2026 10:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants