KomodoPlatform / zebra

An ongoing Rust implementation of a Komodo node. 🦓
Apache License 2.0
3 stars 5 forks source link

Fix best_chain() to require it to have the last nota, add komodo_checkpoint() #45

Closed dimxy closed 1 year ago

dimxy commented 1 year ago

Before this fix best_chain selected a branch just with the most power. This contradicts to the algo in komodod when the active chain always has a nota and creates a risk when some old branch with a low of work, without a nota, may be presented to the user as the best chain. This PR resolves this by making best_chain() select not only the branch with most work but also with the last nota.

closes https://github.com/KomodoPlatform/zebra/issues/32 issue Adds a yet another fix to correct best_chain() to https://github.com/KomodoPlatform/zebra/issues/10 issue and closes it Also fixes cb maturity for testnet needed for tests in https://github.com/KomodoPlatform/zebra/issues/39 issue adds more tests for #39