* Refactor syncHelper() to return SyncNodeState rather than Unit
* Add FilterOrFilterHeaderSync, rework various methods in PeerManager to return Option[FilterOrFilterHeaderSyncState] to indicate if we are syncing rather than Future[Unit]
* Don't use getPeerMessageSender() if we can use syncPeerMessageSender()
* Fix case where syncpeer and new peer are different when creating a filter sync job
* Adjust createFilterSyncJob() return type, throw exception when we try to sync but PeerManager is not started
* Refactor to use SyncNodeState.{toFilterHeaderSync,toFilterSync}
* Cleanup comments
* Reduce reliance of PeerManager._peerDataMap in favor of NodeState.peerDataMap
* Fix bug where we weren't removing peers from NodeState
* Remove invariants
* Empty commit to run CI
* Empty commit to re-run CI
* Add NodeRunningState.removePeer(), add helper method onDisconnectNodeStateUpdate() to consolidate disconnect logic
* Remove duplicate logic
* Add bitcoin-s.node.maxConnectedPeers test
* Clean up resources in test case
* Remove unecessary replacePeers()
* Add NodeState.addPeer()
* Add NodeRunningState.connectedPeerCount, separate handling of connection slots and filter slots
* Use NodeCallbackStreamManager when calling NodeCallbacks constructors to avoid dropping messages
* Fix handling of CallBackHandler.empty and names
* Empty commit to re-run CI
* Empty commit to re-run CI
* Disconnect from bitcoind side rather than bitcoin-s side to make sure we don't run into a race condition for updating lastSeen
* Remove usage of CachedAppConfig, switch implicit param args for PeerDAO to be consistent with rest of code base
* Fix bug in getNodeURIFromBitcoind(), disconnect from bitcoind side in PeerManagerTest
* Add println to see why still fialing
* Add PeerConnection.getLocalAddress, add parameter localAddressBitcoinS to NodeTestUtil.getNodeURIFromBitcoind() to make sure we are getting the correct URI
* Empty commit to run CI
* Fix bug where we weren't removing peer from NodeRunningState.waitingForDisconnection
* Empty commit to re-run CI
* Remove _peerDataMap.remove(i.peer)
* Empty commit to re-run CI
* Replace state even if client.stop() results in a failed Future
* Remove duplicate disconnect() call
* Remove log for case where we haven't set PeerConnection.connectionGraphOpt but call PeerConnection.stop()
* Remove bitcoin-s.node.initialization-timeout
* Get dependencies resolving, get tor module compiling
* Get everything compiling with pekko
* Rework configs/logging to use pekko namespace
* Rename AkkaUtil -> PekkoUtil, BitcoinSAkkaAsyncTest -> BitcoinSPekkoAsyncTest
* Move away from suredbits provided peers by default
* Remove setting bitcoin-s.node.use-default-peers
* Don't allow peer to stay connected if it doesn't support compact filters
* Move disconnection logic into managePeerAfterInitialization()
* Remove reconnect() when we have no other peers, send getaddr message after we know we are keeping the peer connection
* Remove hasCf flag check, revert log
* Reduce inactivity-timeout to 5 minutes by default, shuffle peers in PeerFinder beforing pushing onto stack
* Add logic to disconnect AttemptToConnect peers after addr mesage is received
* Create PeerFinder.queryForPeerConnections(), call it directly from PeerManager on health checks rather than restarting PeerFinder
* scalafmt
* Move more logic into managePeerAfterInitalization()
* Don't set isPersistent for db peers by default
* Add call to queryForPeerConnections() inside of PeerManager.onDisconnect() to try to attempt to more peers when we have no more connections, fix MisBehavingPeer logic to not start sync, starting sync should happen in onDisconnect()
* Revert logback-test.xml
* Sort peers we are attempting to connect to by lastSeen parameter
* Refactor DoneSyncing.toHeaderSync() to return Option[HeaderSync] to represent the case where we don't have a peer to sync with
* scalafmt
* Remove duplicate PeerFinder.buildPeerData()
* Pull PeerFinder changes over from #5390
* Filter out peers we are already connected when attempting to discover peers inside of PeerFinder
* Try to work around mutable.Map.isEmpty bug by converting to immutable Map
* Fix bug in getFilterSyncMarkerFromStopBlockHeader where we were previously querying for children rather than the block hashes at the given height for building the FilterSyncMarker for getcfilter request. Also introduce delay in sending getcfheader because of https://github.com/bitcoin/bitcoin/issues/27085
* Only fallback to reorg scenario if we find no headers at height + 1
* Remove the best filter's block header from the candidate headers in reorg scenarios
* Fix bug where we were attempting to sync twice when we had a MisBehavingPeer, also simplify some logic inside of onDisconnect()
* Pull over more small changes from #5390
* Fix bug in PeerManager.connect() where we would throw ane xception when our PeerFinder had not seen the peer before
* Remove ReConnectionTest case where we constantly try to reconenct o a peer we disconnected, revert logback-test.xml
* Conslidate PeerFinder.start() logic into peerConnectionScheduler, add bitcoins-s.node.try-peers-start-delay config settig to indicate how long until we start attempting to connect to peers in PeerFinder
* Cleanup
* Revert logback-test.xml
* Add documentation
* Empty commit to run CI
* Rework NodeAppConfig.peers to return Vector[Peer] rather than Vector[String]
* Add higher priority to paramPeers
* Move NodeState back to node module
* Refactor peerWithServicesDataMap into NodeState
* More usage of state.peerDataMap in stream
* Fix log message
* Fix compile
* Move PeerFinder into NodeState
* WIP: Move PeerFinder init into NeutrinoNode.start()
* Get things mostly working again after rebase
* Fix bug in handling of headers message where we wouldn't transition to DoneSyncing if a peer sent us 0 headers
* Move SendToPeer into stream
* scalafmt
* Empty commit to run CI
* Re-add DataMessageHandlerTest
* Renable disconnecting portion of NeutrinoNodeTest
* Empty commit to run CI
* Remove disconnection part of test again
* Empty commit to re-run CI
* Empty commit to re-run CI
* Dont initiate disconnect logic from bitcoind, its falky for some reason
* Fix bug where we weren't switching sync to another peer on disconnect for the case where we were waiting for disconnection
* Empty commit to run CI
* Empty commit to run CI
* Add NodeShuttingDown
* Add NodeShutdown to NodeStreamMessage, use it in PeerManager.stop()
* Add guard to NeutrinoNode.stop() to see if stop() was called when the isStarted flag is set, if we aren't started don't attempt to destroy the akka stream
* Rework NodeTestUtil to use a specific bestBlockHash, this is useful in reorg situations
Use param in reorg test, modify scaladoc
WIP
* Cleanup
* Try to fix usage of stopHashBE
* Cleanup
* WIP: Fix getCompactFilterStartHeight()
* Revert logback-test.xml
* Fix bug with isFiltersSynced() in reorg situations
* scalafmt, fix compile
* Fix another bug with isFiltersSynced()
* Fix compile
* Add ChainApi.getBestChainTips()
* Implement BitcoindRpcClient.getBestChainTips()
* Revert NodeTestUtil
* Use ChainApi.getBestChainTips() throughout codebase rather than blockHeaderDAO.getBestChainTips()
* Fix another bug with isFiltersSynced()
* Fix compile
* Cleanup uncessary checks
* Empty commit to re-run CI
* Empty commit to re-run CI
* Empty commit to re-run CI
* Rework randomPeerWithServices() to be inside of NodeState, try to move more state into NodeState
* Don't try to sync from peer waitingForDisconnection
* Add PeerWithServices, keep track of ServiceIdentifier in PeerManager and NodeState
* Try to make reorg test more reliable
* Empty commit to run CI