Refactors cleanup (#372)

* cleanup peermanager

* cleanup geohash code

* direct connections fix

* pow display

* track disconnects too

* display pow only if enabled

* display pow only if enabled

* direct connection tracking
This commit is contained in:
callebtc
2025-09-02 22:09:44 +02:00
committed by GitHub
parent bbf5918896
commit 8b3dc71dc6
13 changed files with 181 additions and 147 deletions
@@ -16,8 +16,8 @@ object PoWPreferenceManager {
private const val KEY_POW_DIFFICULTY = "pow_difficulty"
// Default values
private const val DEFAULT_POW_ENABLED = true
private const val DEFAULT_POW_DIFFICULTY = 10 // Reasonable default for geohash spam prevention
private const val DEFAULT_POW_ENABLED = false
private const val DEFAULT_POW_DIFFICULTY = 16 // Reasonable default for geohash spam prevention
// State flows for reactive UI
private val _powEnabled = MutableStateFlow(DEFAULT_POW_ENABLED)