Commit Graph

2366 Commits

Author SHA1 Message Date
Mike Hearn
40ee90cc0c Wallet: track UTXOs explicitly and use that to try and accelerate Bloom filtering for large wallets. 2015-03-21 17:02:24 +01:00
Mike Hearn
ed3ef7d15e Make stall threshold configurable and reset parameters to be more appropriate for most wallets. 2015-03-18 13:30:42 +01:00
Mike Hearn
f693d88620 Add JavaDocs for the new PeerGroup methods added by Oscar. 2015-03-18 12:51:29 +01:00
Oscar Guindzberg
2c5d9f73ed Allow disabling bloom filters on the peer group without using a
FullPrunedBlockChain
2015-03-18 12:51:29 +01:00
Andreas Schildbach
c6ee7449c3 Adjust stall period to 15 seconds and min speed to 5 kB/s. The previous 6 seconds caused otherwise quick peers to be disconnected too often. Also, fixed a compare bug and a comment. 2015-03-15 15:34:13 +01:00
Mike Hearn
7e12da357c Undo the memory usage optimisation for scriptPubKey parsing on Android to see if CPU time now matters more than memory (especially when combined with the wallet unspents tracking work). 2015-03-13 18:00:05 -07:00
Mike Hearn
7f14f7e491 On Android, use non-cycle detecting locks with fairness activated (experimental) 2015-03-13 17:59:24 -07:00
Andreas Schildbach
59b426afe0 Increase wallet autosave delay for wallet-tool and WalletAppKit. Since we have some recovery for out-of-sync wallets in place, we can afford to save less often. 2015-03-12 18:07:51 +01:00
Andreas Schildbach
9e4d25b2c2 Properly ignore PeerGroupTest.peerPriority(). 2015-03-12 10:58:38 +01:00
Mike Hearn
c4a49eeb85 Experiment: disconnect a peer if it falls below 10 blocks per second for at least 6 seconds. This is an attempt to speed up chain sync by load balancing off slow peers. 2015-03-11 12:59:41 -07:00
Mike Hearn
3e1f615853 Correct a comment in ChainSplitTest 2015-03-10 18:48:37 -07:00
Mike Hearn
3116b612bd Disable flaky PeerGroup.peerPriority test pending a rewrite of it to be less flaky. 2015-03-10 17:07:17 -07:00
Mike Hearn
821de89e69 TransactionOutput: take parent hash and index into account in the hashcode. Inserting TransactionOutput's with identical scripts/values but different outpoints into a hashset will work properly now. 2015-03-10 17:03:21 -07:00
Mike Hearn
c0297f2c12 TransactionOutPoint: fix hashCode to include index. 2015-03-10 16:51:00 -07:00
Mike Hearn
75b952d1c7 Sha256Hash: use Guava to pack the hash code instead of hand written code. 2015-03-05 14:06:56 -08:00
Mike Hearn
6aa4e51de6 Sha256Hash: some tweaks and renamings in the API (backwards compatible). 2015-03-05 13:59:15 -08:00
Mike Hearn
bf60a925bc Sha256Hash is immutable so byte[] should be marked as final. 2015-03-05 13:43:25 -08:00
Mike Hearn
c30df6ca25 Peer: Bug fix for the case where we don't want to download even block headers. 2015-03-05 13:43:11 -08:00
Mike Hearn
6c733b2f22 Wallet: suppress an invalid static analysis warning. 2015-03-03 11:02:44 -08:00
Mike Hearn
59e06c0a9b Take out Alex Kotenko's testnet seed as it appears to be down. 2015-03-03 11:02:21 -08:00
Mike Hearn
f12122f585 Address: serialize network parameters in Java serialization as well. 2015-03-03 11:02:01 -08:00
Mike Hearn
8e75134932 ChannelConnectionTest: Delete unused field. 2015-03-01 21:24:21 +01:00
Mike Hearn
e0870efd61 Rewrite how WalletTemplate estimates scrypt difficulty, as the old approach was horribly busted and could use tons of RAM. Backport from Lighthouse. 2015-02-25 18:58:15 +01:00
Mike Hearn
99ff22d77b Fix a bug in SendMoneyController that caused it to forget the amount of money requested across password requests. Fixes #316. 2015-02-25 18:49:25 +01:00
Oscar Guindzberg
03f2f9e47a Make MemoryFullPrunedBlockStore just implement FullPrunedBlockStore.
UTXOProvider is redundant
2015-02-25 18:26:01 +01:00
Andreas Schildbach
dbf04a812b Devrandom's proposed changes due to his review of 'ECKey/DeterministicKey: replace ECPoint with a LazyECPoint wrapper that doesn't delays parsing of key bytes into a key structure until it's needed.' 2015-02-24 14:14:03 +01:00
Oscar Guindzberg
1b26034506 Fix typo 2015-02-23 17:54:11 -03:00
Mike Hearn
1542a88b5f Put back the KeyChainGroup log message and remove an apparently useless wallet creation on the load path in WalletAppKit that was triggering it. 2015-02-23 12:07:06 +01:00
En-Ran Zhou
b81b0f78d5 Fix a typo, and reformat the comment to 120 cols 2015-02-23 04:23:30 -06:00
Mike Hearn
bef4980abd (API CHANGE) Return a TransactionBroadcast object from PeerGroup.broadcastTransaction.
Old code can be updated by simply calling future() on the returned object to get the previous result.

TransactionBroadcast now has a progress reporting interface, which is ideal for connection to progress bars, pie charts, whatever else you want to use in the UI for showing the progress of sending money/broadcasting a tx.
2015-02-20 15:01:54 +01:00
Mike Hearn
298cccfe4f Remove misleading log statement. 2015-02-20 15:00:19 +01:00
Mike Hearn
4303a253c8 Split an unwieldy log line. 2015-02-19 15:12:07 +01:00
Adam Mackler
7ef5ab9abf Don't discard hierarchy data when deserializing an HD key.
Fingerprints are now ints rather than four-byte arrays.
2015-02-18 12:42:50 +01:00
Mike Hearn
eed4901a6e Add a couple of missing thread safety bits to PeerGroup members. 2015-02-17 17:02:58 +01:00
Mike Hearn
c0b34109d0 Delete some dead code from PeerGroup 2015-02-17 17:02:58 +01:00
Mike Hearn
1efa1442c8 (API CHANGE) Pass the FilteredBlock into PeerEventListener.onBlocksDownloaded when present.
Keep track of downloaded vs server-side filtered transactions per second.
Add a keyboard shortcut to wallet-template to force disconnection from the current peer.
2015-02-17 17:02:57 +01:00
Mike Hearn
fcd4b8b68a Block: getTransactions() should not throw if the block represents a header, but rather return null. 2015-02-17 15:16:43 +01:00
Mike Hearn
b2c1aba4d6 PeerGroup: sync improvements round two. Move chain download speed monitoring out of AbstractBlockChain and fix it so it doesn't sometimes print garbage. Add a stall detector. Next step is to force switch download peers when there's a long enough stall. 2015-02-16 18:11:46 +01:00
Mike Hearn
887bc63ce2 PeerGroup: simplify how the download peer is selected to avoid pointless thrashing at startup. This change will probably reduce load on the network as well. 2015-02-16 17:45:48 +01:00
Mike Hearn
7d98075efe DnsSeedDiscovery: toString() method to give better log errors. 2015-02-16 17:43:06 +01:00
Adam Mackler
e8138c21b0 Change PeerGroup.addPeerFilterProvider to return a ListenableFuture<BloomFilter>
Currently 'addPeerFilterProvider()` returns `void`.  After this patch it
returns the `ListenableFuture<BloomFilter>` that is returned by its
invocation of `recalculateFastCatchupAndFilter()`.
2015-02-09 14:16:29 +01:00
Carlos Lopez-Camey
212aa41143 Updates PeerGroup's javadoc: PeerGroup is not a guava service as from 27bc229 2015-02-07 17:04:22 -06:00
Andreas Schildbach
815c4b9ced Add current-receive-addr action to wallet-tool. 2015-02-03 00:18:45 +01:00
Sean Gilligan
c72c48cd58 Add Comparable to VersionedChecksummedBytes
* Add Comparable interface to VersionedChecksummedBytes
* Add compareTo() method to VersionedChecksummedBytes
* Add test for VersionedChecksummedBytes
* Add tests for Address
2015-02-03 00:15:25 +01:00
Mike Hearn
0d51cee24f PeerGroup: ignore another source of RejectedExecutionException during shutdown 2015-02-02 17:29:50 +01:00
Mike Hearn
653773d67a PeerGroup: don't try and trigger connections during shutdown 2015-01-29 19:24:14 +01:00
Mike Hearn
bc60f0d1f2 TransactionBroadcast: only consider a tx rejected if it has more than half peers signalling a reject. 2015-01-29 19:24:02 +01:00
Mike Hearn
c981555be4 RejectMessage: add a c'tor for initialising a new message and fix a bug in serialisation. 2015-01-29 19:19:28 +01:00
Oscar Guindzberg
f3fa050c09 DeterministicKeyChain Builder - add seedCreationTimeSecs() 2015-01-28 17:21:18 -03:00
Mike Hearn
f1f07df11b ECKey: extend the comment about why private keys of zero and one are now forbidden 2015-01-28 19:37:13 +01:00