iron-fish / ironfish

A novel cryptocurrency focused on privacy and accessibility.
https://ironfish.network
Mozilla Public License 2.0
964 stars 577 forks source link

avoids modifying db in 'shouldDecryptForAccount' #5022

Closed hughy closed 4 weeks ago

hughy commented 1 month ago

Summary

when comparing an account's birthday to the current block during a scan we reset the account birthday and account head if the birthday matches in sequence, but not in hash

the wallet cannot encounter this during a scan because we check account birthdays when the wallet starts and when accounts are imported

makes the check on account birthdays more robust by updating 'chainHasBlock' to return false if the block exists but is not on the main chain

furthermore it is less predictable to modify the db for an account during a filtering operation

Testing Plan

Documentation

Does this change require any updates to the Iron Fish Docs (ex. the RPC API Reference)? If yes, link a related documentation pull request for the website.

[ ] Yes

Breaking Change

Is this a breaking change? If yes, add notes below on why this is breaking and label it with breaking-change-rpc or breaking-change-sdk.

[ ] Yes