disable stream validity check in ElectrumXInterface.fetchChainHeight

This commit is contained in:
sneurlax 2024-02-05 17:21:47 -06:00
parent 2fb3034dc0
commit c8b323748b

View file

@ -817,23 +817,21 @@ mixin ElectrumXInterface<T extends Bip39HDCurrency> on Bip39HDWallet<T> {
.resume();
}
// Check if the stream subscription is active by pinging it.
if (!(await subscribableElectrumXClient.ping())) {
// If it's not active, reconnect it.
final node = await getCurrentElectrumXNode();
await subscribableElectrumXClient.connect(
host: node.address, port: node.port);
// Wait for first response.
return completer.future;
}
// Causes synchronization to stall.
// // Check if the stream subscription is active by pinging it.
// if (!(await subscribableElectrumXClient.ping())) {
// // If it's not active, reconnect it.
// final node = await getCurrentElectrumXNode();
//
// await subscribableElectrumXClient.connect(
// host: node.address, port: node.port);
//
// // Wait for first response.
// return completer.future;
// }
if (_latestHeight != null) {
return _latestHeight!;
} else {
// Wait for first response.
return completer.future;
}
}