From 4acdcb06d9273e2cc048d2538f28efa0044b7b71 Mon Sep 17 00:00:00 2001 From: Peter John Bushnell Date: Wed, 4 Jan 2023 10:22:43 +0000 Subject: [PATCH] SPV: update testnet seed nodes (#1682) * SPV: update testnet seed nodes * Break out of loop if shutdown requested * Replace seed Co-authored-by: Prasanna Loganathar --- src/spv/bitcoin/BRChainParams.cpp | 4 ++-- src/spv/bitcoin/BRPeerManager.cpp | 4 ++++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/spv/bitcoin/BRChainParams.cpp b/src/spv/bitcoin/BRChainParams.cpp index 051eea8ad9..4734c6298e 100644 --- a/src/spv/bitcoin/BRChainParams.cpp +++ b/src/spv/bitcoin/BRChainParams.cpp @@ -33,8 +33,8 @@ static const char *BRMainNetDNSSeeds[] = { }; static const char *BRTestNetDNSSeeds[] = { - "testnet-seed.breadwallet.com.", "testnet-seed.bitcoin.petertodd.org.", "testnet-seed.bluematt.me.", - "testnet-seed.bitcoin.schildbach.de.", NULL + "testnet-seed.breadwallet.com.", "testnet-seed.bitcoin.jonasschnelli.ch.", "seed.testnet.bitcoin.sprovoost.nl.", + "testnet-seed.bluematt.me.", NULL }; // blockchain checkpoints - these are also used as starting points for partial chain downloads, so they must be at diff --git a/src/spv/bitcoin/BRPeerManager.cpp b/src/spv/bitcoin/BRPeerManager.cpp index 8426643d3c..7298c504da 100644 --- a/src/spv/bitcoin/BRPeerManager.cpp +++ b/src/spv/bitcoin/BRPeerManager.cpp @@ -1757,6 +1757,10 @@ void BRPeerManagerConnect(BRPeerManager *manager) } while (array_count(manager->peers) > 0 && array_count(manager->connectedPeers) < manager->maxConnectCount) { + // Break out of loop to allow shutdown. + if (ShutdownRequested()) { + break; + } size_t i = BRRand((uint32_t)array_count(manager->peers)); // index of random peer BRPeerCallbackInfo *info;