The problem is when reorganization occurs on chain, so the parent block does not exist any more. function handleReconcileImpl() should check if the obtained block is nil (parent == nil):
parent, err := t.provider.GetBlockByHash(block.ParentHash, false)
There are some additional places in blocktracker.go and tracker.go which should be handled also. They are introduces in this PR as well.
The problem is when reorganization occurs on chain, so the parent block does not exist any more. function
handleReconcileImpl()
should check if the obtained block isnil
(parent == nil
):parent, err := t.provider.GetBlockByHash(block.ParentHash, false)
There are some additional places in
blocktracker.go
and tracker.go which should be handled also. They are introduces in this PR as well.