machinecoin-project / bitcoin-wallet

This project ports "bitcoin-wallet" to be compatible with Machinecoin.
1 stars 3 forks source link

Not in trusted peer mode #5

Open Gitju opened 10 years ago

Gitju commented 10 years ago

The android app actually crashes when it does not run in trusted peer mode. The reason for this is located in // /core/src/main/java/com/google/bitcoin/core/PeerGroup.java

if (numPeers < getMaxConnections()) { lock.lock(); try { try { connectToAnyPeer();

which under special circumstances can cause this.

Quick workaround for phone users would be:

  1. Disable internet on the phone (WLAN for example)
  2. Start the app and go to settings
  3. Add a trusted peer for example 93.186.200.79 4 Disable connections to other peers despite the trusted peer.
  4. Enable internet on the phone again

Quick workaround inside of the source code is: // /wallet/src/de/schildbach/wallet/WalletApplication.java public int maxConnectedPeers() { final int memoryClass = activityManager.getMemoryClass(); if (memoryClass <= Constants.MEMORY_CLASS_LOWEND) return 1; // was 4 else return 1; // was 6 }

Will fix that soon and update the repository.

Gitju commented 10 years ago

Should be fixed with https://github.com/Gitju/bitcoin-wallet/commit/f06974842fb5a24977d3c6d9b17d69c5b395ceb1 Will increase the limit later again and therefore let this ticket open.