* Update scalafmt-core to 3.8.1
* Update .scalafmt.conf settings to be factory default settings
* Fix typo
* scalafmt
* Empty commit to re-run CI
* Revert some scalafmt back to original scalafmt.conf
---------
Co-authored-by: Chris Stewart <stewart.chris1234@gmail.com>
* Rework DataMessageHandler to consider syncing filterheaders if we receive a headers message with 0 block headers
* scalafmt
* Remove syncfilter job
* Cleanup
* Reduce received headers log to DEBUG
* Rework SyncNodeState.toString()
* Call PeerManager.startFilterSync() in DataMessageHandler
* Don't test MTP in unrelated test
* Add sentQuery Instant to SyncNodeState subclasses, add logic in DataMessageHandler.handlePayload() to detect if a query has timed out
* Refactor to use NodeTestUtil.disconnectNode()
* Cleanup comments
* 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