In SPV validation for lightning, we query electurms to find the most synced one and use the block height of it as our target block height. We determine the "most synced" by having the greatest block height.
We might have a bad electrum on a forked chain that has larger block count but less overall work, by consensus, such chain isn't the correct chain.
https://github.com/KomodoPlatform/komodo-defi-framework/blob/c1175ceddb2db4c8e7948b6c764bfd53aea1f8c0/mm2src/coins/utxo/rpc_clients/electrum_rpc/client.rs#L813-L816
We should be able to rule out such electrums and remove them from our connection list.
Relevant convo: #2666 (comment)
In SPV validation for lightning, we query electurms to find the most synced one and use the block height of it as our target block height. We determine the "most synced" by having the greatest block height.
We might have a bad electrum on a forked chain that has larger block count but less overall work, by consensus, such chain isn't the correct chain.
https://github.com/KomodoPlatform/komodo-defi-framework/blob/c1175ceddb2db4c8e7948b6c764bfd53aea1f8c0/mm2src/coins/utxo/rpc_clients/electrum_rpc/client.rs#L813-L816
We should be able to rule out such electrums and remove them from our connection list.
Relevant convo: #2666 (comment)