Merge bitcoindevkit/bdk#2174: fix(chain): prevent `merge_chains` from replacing the genesis block
be8e156115e21750158d44394341f1d41dfbf90f fix(chain): prevent `merge_chains` from replacing the genesis block (Elias Rohrer)
Pull request description:
### Description
Other code paths (`disconnect_from`, `CheckPoint::insert`) already protect height 0 from modification, but `merge_chains` allowed an update chain with a different genesis hash to silently replace the wallet's existing genesis block. Return `CannotConnectError` when the update attempts to change the block hash at height 0.
Co-Authored-By: HAL 9000
### Checklists
#### All Submissions:
* [x] I followed the [contribution guidelines](https://github.com/bitcoindevkit/bdk/blob/master/CONTRIBUTING.md)
#### Bugfixes:
* [ ] This pull request breaks the existing API
* [x] I've added tests to reproduce the issue which are now passing
* [ ] I'm linking the issue being fixed by this PR
ACKs for top commit:
ValuedMammal:
ACK
be8e156115e21750158d44394341f1d41dfbf90f
evanlinjin:
ACK
be8e156115e21750158d44394341f1d41dfbf90f
Tree-SHA512: 743c95f281faf39f7f825693e684ad96a70b2994a6186721a68eacd0c3d4488092883e6dfe3b349e5241fc9a85a02dad222da7e932a50be5324df69d73cbb4a6