mirror of
https://github.com/cypherstack/stack_wallet.git
synced 2024-11-17 17:57:40 +00:00
disable stream validity check in ElectrumXInterface.fetchChainHeight
This commit is contained in:
parent
2fb3034dc0
commit
c8b323748b
1 changed files with 12 additions and 14 deletions
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue