gcash / bchd

An alternative full node bitcoin cash implementation written in Go (golang)
ISC License
280 stars 101 forks source link

need direction on bug with invalidateblock #512

Open BrannonKing opened 2 years ago

BrannonKing commented 2 years ago

The invalidateblock command has a bug wherein it doesn't follow side-chains with more work (after the best chain is invalidated).

See https://github.com/lbryio/lbcd/issues/86 .

Is this because the getReorganizeNodes -> bestchain.FindFork doesn't account for the newly invalidated nodes (since they haven't been invalidated at the time it's called)?

Would calling getReorganizeNodes again after the invalidations work?

Any other ideas on how to fix this issue?