You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jun 30, 2021. It is now read-only.
This is mostly tough because testing it is somewhat tricky. Either setup complete testing infrastructure and mock everything (time consuming) or do a one off test with testnet in a box and three nodes.
Either way, to be fully featured this is completely necessary. Steps would be approximately:
Check if highest indexed block hash is equal to what the RPC server has for that height.
If not, go backwards and continue comparing until you get a match. Each block that doesn't match needs to:
Be marked as Orphan
Have all linked Transactions remove their block reference.
Add new entry to the "seen in" many to many between blocks and transactions
Update confirmation status of the Transaction (if we start caching this).