This repository was archived by the owner on Jul 12, 2021. It is now read-only.

Description
I ran into this problem while running a heavily modified electrum server for an altcoin. The problem occurred during a block reorg. I believe unmodified electrum-server also have the same issue, but I might not be understanding the problem fully. Sorry if this is the case.
On line https://github.com/spesmilo/electrum-server/blob/master/src/storage.py#L539 ,
it tries to access the grandparent of the node to delete, but there is no check to see if there is a grandparent(it might be a node under the root ). An IndexError exception will then be thrown.
Seems like there needs to be an if statement to check for a grandparent that wraps around line 539 to line 554?