Commit Graph

4993 Commits

Author SHA1 Message Date
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
Mike Hearn
ff52cfd86b Add a tool that prints out an arbitrary block given its hash. 2011-07-06 13:43:46 +00:00
Mike Hearn
10fef0b480 Add a constructor that allows wallet-less operation (now possible due to the previous patch to support multiple wallets). 2011-07-06 13:42:31 +00:00
Mike Hearn
062ad32851 Fix the getBlock() method to use the correct message type. 2011-07-06 13:40:54 +00:00
Mike Hearn
1f5922b2f4 Add a removeEventListener method. Idea from Andreas. Resolves issue 27. 2011-07-06 12:44:18 +00:00
Mike Hearn
2e2c941919 Support attaching multiple wallets to a single BlockChain. Patch from Jan Møller. Resolves issue 39. 2011-07-06 12:36:19 +00:00
Mike Hearn
2c74beb9f5 Fix a bug in Transaction.getValueSentFromMe() in which inputs connected to outputs that existed in the wallet but were not actually owned by us were counted. Resolves issue 36. Patch from Jan Møller. 2011-07-06 12:12:18 +00:00
Mike Hearn
bcff039a62 Remove the test prefix from WalletTest methods. It's unnecessary with JUnit 4. 2011-07-06 12:01:05 +00:00
Mike Hearn
61488d88d6 Add dnsseed.bluematt.me to the DNS discovery list. 2011-07-06 11:59:09 +00:00
Mike Hearn
037d99770d Bump version number to 0.3-SNAPSHOT 2011-07-06 11:48:24 +00:00
Miron Cuperman (devrandom)
54b44be316 Peer groups 2011-07-01 21:42:21 +00:00
Mike Hearn
8d302120f8 Remove stray import. 2011-07-01 09:22:39 +00:00
Mike Hearn
3b8b0833c5 Use Sha256Hash more consistently, improve the class a bit.
Note that the endianness of the hashes is still very ad-hoc and messy. Next step is to pick an endianness and stick with it, to reduce the number of times reverseBytes is used.
2011-06-30 20:33:41 +00:00
Mike Hearn
46ccc7389d Fix a typo bug in IrcDiscoveryTest. Patch from Nathan Baulch. Resolves issue 33. 2011-06-30 19:00:52 +00:00
Mike Hearn
cc70107e27 Move some classes into new packages. 2011-06-29 17:45:18 +00:00
Mike Hearn
675abc2974 Remove transactions from the dead pool when they become live, and from pending when they become dead. Addresses comments from Miron. 2011-06-27 19:56:37 +00:00