spesmilo / electrumx

Alternative implementation of spesmilo/electrum-server
MIT License
429 stars 343 forks source link

fix hosts being None #244

Closed shivamlmnl closed 6 months ago

shivamlmnl commented 6 months ago

Fixes the hosts being returned as None. I haven't determined the underlying cause but this fixes it.

Error:

hosts = [host.lower() for host in features.get('hosts', {})]
TypeError: 'NoneType' object is not iterable
dhruvil-shah-btc commented 6 months ago

This fixed my BCH electrum node that was crashing

SomberNight commented 6 months ago

Thanks a lot for the report. The proposed fix was insufficient as features.get('hosts') can have invalid values other than None, e.g. some positive integer. I've added more generic protection in https://github.com/spesmilo/electrumx/commit/97a016c9ca9d49b3e5b22a66fd6caab537879340.