Mike Hearn
0c8638ae2e
Delete lib directory. Resolves issue 68.
2011-08-10 15:57:34 +00:00
Mike Hearn
1785f9bb1c
Clear out the remaining non-security related FindBugs warnings.
2011-08-05 21:00:25 +00:00
Mike Hearn
ddb1679a78
Make a couple of inner classes static for efficiency, clears some FindBugs warnings.
...
Throw an exception if file delete in the block store failed, clears another warning.
2011-08-05 20:46:23 +00:00
Mike Hearn
48fce919aa
Minor efficiency improvement: use entrySet() instead of keySet()+get(). Clears out a FindBugs warning.
2011-08-05 20:39:12 +00:00
Mike Hearn
58b18fa724
Delete the unused/incomplete Transaction.verifyInput method.
2011-08-05 20:34:55 +00:00
Mike Hearn
49d676160c
Remove the built-in copy of Bouncy Castle. Instead, make it a dependency in the Maven POM. Also include the shade plugin so the final JARs won't cause conflicts on Android. Resolves issue 42. Patch by Jonny Heggheim.
2011-08-05 20:25:00 +00:00
Mike Hearn
67aa0ae4a3
Always close the FileOutputStream in Wallet.saveToFile(). Cleans up a FindBugs warning.
2011-08-05 20:03:24 +00:00
Mike Hearn
20adfd9965
Propagate BlockStoreException in BlockChain.setChainHead
2011-08-05 15:49:21 +00:00
Mike Hearn
ec4b53a973
Lower priority for peer threads to avoid competing with UI threads. Resolves issue 67.
2011-08-05 15:45:56 +00:00
Mike Hearn
3498763d18
Delete some dead code in Script that was confusing people; BitCoinJ does not run scripts.
...
Remove build.xml as we've switched to Maven.
2011-08-05 14:37:48 +00:00
Mike Hearn
78bdd09189
Log the block chain height to debug, not info.
2011-08-05 14:26:29 +00:00
Mike Hearn
dd8208c135
Print date and time in DownloadListener.
2011-08-05 14:17:18 +00:00
Mike Hearn
2191a9979f
Rename Block.getTime() to Block.getTimeSeconds() and note the metric used in the javadoc.
...
Don't rethrow BlockStoreException as RuntimeException in BlockChain constructor. Updates issue 66.
2011-08-05 14:10:57 +00:00
Mike Hearn
4e097c1e80
Throw BlockStoreException if the chain head doesn't seem to be in the store. Update issue 66.
2011-08-05 14:09:48 +00:00
Mike Hearn
94f36ae8ec
Remove a java6ism (IOError)
2011-08-05 14:08:35 +00:00
Mike Hearn
0b3c97239a
Fix compile error.
2011-08-05 14:06:54 +00:00
Mike Hearn
a598132514
Minor formatting change.
2011-08-05 14:02:09 +00:00
Mike Hearn
dafb806f05
Don't mark outputs that spend to non-wallet addresses as spent. This avoids a problem in the case where you send somebody coins with change and they immediately send you the coins back. Add a unit test to prove the bug is solved. Existing wallets will need to be refreshed. Resolves issue 64.
2011-08-05 12:36:05 +00:00
Miron Cuperman (devrandom)
3327e02f80
Do not callback if nothing to download from peer. Resolves issue 61
2011-07-28 19:27:22 +00:00
Miron Cuperman (devrandom)
dfad026523
Clean up exception handling in Peer/PeerGroup. Resolves issue 65
2011-07-28 19:22:56 +00:00
Mike Hearn
0d085606df
Fix a bogus comment in checkMerkleBranch().
2011-07-26 20:22:21 +00:00
Miron Cuperman (devrandom)
be531960d6
PeerGroup connect/disconnect callback
2011-07-25 22:38:46 +00:00
Miron Cuperman (devrandom)
1cf1147c87
Ensure peer is disconnected in PeerGroup
2011-07-25 22:08:58 +00:00
Miron Cuperman (devrandom)
8469c8fd86
Fix PeerGroup.peers iterator synchronization
2011-07-25 20:06:51 +00:00
Miron Cuperman (devrandom)
652a394fc1
PeerGroup fixes for maxConnections and block timestamp
2011-07-25 19:51:22 +00:00
Miron Cuperman (devrandom)
7dd1fce5aa
Clean up Peer exception handling
2011-07-20 22:10:14 +00:00
Miron Cuperman (devrandom)
0d4daee3c4
Java 5 compatibility - remove some @Override pragmas
2011-07-20 20:17:01 +00:00
Mike Hearn
18d45f0590
Update repo URLs. Patch from Gary Rowe.
2011-07-20 10:51:18 +00:00
Miron Cuperman (devrandom)
89adfe62d3
Merge peergroup branch into trunk
2011-07-19 18:22:11 +00:00
Miron Cuperman (devrandom)
b9aae06490
Default PeerGroup connections now 4
2011-07-19 17:59:39 +00:00
Mike Hearn
440b2d28ac
Fix IrcDiscovery to not expect the IRC server to return the user list when joining the server automatically. This does not happen for all IRC server implementations. Rather the NAMES command should be sent to ensure that the user list is returned. It also fixes that the returned lines start with a colon that has to be removed before sending the line to the parseUserList method. Patch from Wolfgang Nagele. Resolves issue 50.
2011-07-18 20:39:00 +00:00
Mike Hearn
c3933a7773
Make the unit tests more realistic and fix two bugs this revealed:
...
1) Receiving coins regressed after the last optimization. Resolves issue 49.
2) Reorg handling expected to be able to connect all inputs.
Also other minor fixes and small additions.
2011-07-18 20:15:39 +00:00
Miron Cuperman (devrandom)
f68edc80cc
Fix bug in FetchBlock introduced by peergroup merge
2011-07-15 23:25:45 +00:00
Miron Cuperman (devrandom)
71931ccb76
Merge trunk into peerroup
2011-07-15 23:03:23 +00:00
Miron Cuperman (devrandom)
29d996b552
PeerGroup cleanup 2
2011-07-15 22:59:15 +00:00
Miron Cuperman (devrandom)
d7d52cadd2
PeerGroup cleanup
2011-07-14 20:13:11 +00:00
Mike Hearn
e990bcd181
Add distribution management section to Maven pom.xml. Patch from Gary Rowe. Update issue 13.
2011-07-14 07:12:17 +00:00
Mike Hearn
1a4e2e67d1
Quick hack to not crash when connected to a node that has less of the chain than we do. Real fix must wait for PeerGroup to land. Resolves issue 44.
2011-07-13 20:52:08 +00:00
Mike Hearn
ea8cbd7465
Don't pre-calculate the hash in the Transaction parse code. Speeds up processing of large blocks with no relevant transactions.
2011-07-10 17:38:18 +00:00
Mike Hearn
53d5d7572b
Delete unused setFakeHashForTesting method.
2011-07-10 15:53:50 +00:00
Mike Hearn
48535f9a9c
Optimize chain download further by skipping merkle root verification unless there are transactions relevant to a wallet in the block. Refactor some code out of WalletTest into a new static TestUtils class.
2011-07-10 15:52:06 +00:00
Miron Cuperman (devrandom)
8e84d71308
PeerGroup - fix copyright and text
2011-07-06 20:41:41 +00:00
Miron Cuperman (devrandom)
6053c9087c
PeerGroup first draft - new files
2011-07-06 20:39:17 +00:00
Miron Cuperman (devrandom)
cd2f4c655b
PeerGroup first draft
2011-07-06 20:38:38 +00:00
Mike Hearn
85caefbd4d
Store 2050 blocks in the BoundedOverheadBlockStore memory cache. This eliminates the delay on difficulty transitions. We now regularly hit 500 blocks per second, ie, we are sender-constrained.
2011-07-06 15:53:50 +00:00
Mike Hearn
af843bc424
Minor style fix
2011-07-06 15:44:50 +00:00
Mike Hearn
16f2fae0ce
Replace reflection with an if ladder for deserialization, as reflection was dominating the profiles (60% of all time spent downloading the chain). Takes us from around 250-300 blocks per second to over 400.
2011-07-06 15:44:20 +00:00
Mike Hearn
d654a33376
Clone cached hash in Block.cloneAsHeader(). Before this hash recalculation was about half the time spent inside BoundedOverheadBlockStore.put(), now it does not appear in the profiles.
2011-07-06 15:30:08 +00:00
Mike Hearn
5dbd6c638b
Don't construct a debug message unless that channel is enabled. Takes serialize() out of the profiles.
2011-07-06 15:25:15 +00:00
Mike Hearn
d37723afbf
Optimize Block.cloneAsHeader() which was taking about 25% of the CPU during chain download on Android. The previous implementation was lazy (serialize and deserialize), the new implementation is much faster and not much more complex.
...
The profiles are now dominated by checking difficulty transitions.
2011-07-06 15:15:44 +00:00