Commit Graph

104 Commits

Author SHA1 Message Date
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
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
Mike Hearn
ca84bea462 Refresh the TODO file 2011-06-27 14:34:48 +00:00
Mike Hearn
c7affe156d Move javadocs to the maven directory, check in fresh set 2011-06-27 14:29:17 +00:00
Mike Hearn
653d544b53 Minor fixes. 2011-06-27 14:18:47 +00:00
Mike Hearn
dca09950e7 Attempt to exclude Bouncy Castle from javadocs/coverage reports. Doesn't work for coverage for some reason. 2011-06-27 14:17:11 +00:00
Mike Hearn
7d007dc329 Update README to talk about Maven. 2011-06-27 14:16:38 +00:00
Mike Hearn
51c7bd7224 Checked in extra POM code. Patch by Gary Rowe. 2011-06-27 13:08:59 +00:00
Mike Hearn
5114e6ccec Don't output an info log for every block downloaded. 2011-06-27 11:37:39 +00:00
Mike Hearn
212faf078c Bugfix from Noa Resare. Resolves issue 29. 2011-06-27 11:25:43 +00:00
Mike Hearn
66e596a8eb De-Satoshize the buildMerkleTree function:
- Clarify the terminology in the existing explanation.
- Add an explanation of what the point of the structure is.
- Note how non-power-of-two transaction list sizes are handled.
- Rename variables to be more helpful than i,i2,j etc.
- Add a more detailed explanation of each step of the algorithm.
2011-06-24 16:18:06 +00:00
Mike Hearn
65bb4a20f8 Fix PeerAddress serialization and add a test. Patch from Noa Resare. Fixes issue 29. 2011-06-24 13:03:23 +00:00
Mike Hearn
d1385d50df Ignore duplicate adds of the chain head. 2011-06-14 16:01:38 +00:00
Mike Hearn
ece79783ab Bit more debugging data in StoredBlock.toString() 2011-06-14 16:00:00 +00:00
Mike Hearn
61ec87d4b5 Refresh AUTHORS file. 2011-06-14 13:58:53 +00:00
Mike Hearn
b5d04a36e1 Add a program that just loads a wallet, runs through the block chain, and then saves/prints out the resulting wallet at the end. 2011-06-14 13:42:41 +00:00
Mike Hearn
320933bb70 Add more info to the Wallet.toString() output. 2011-06-14 13:41:11 +00:00
Mike Hearn
f6fd61a3a0 Add a SeedPeers class that contains a pre-compiled list of IP addresses taking part in the Bitcoin network for a long period of time, for use if IRC and DNS are unavailable. Based on a patch by Micheal Swiggs. 2011-06-14 13:01:47 +00:00
Mike Hearn
636a47b320 Mention testnet in a box in the PingService docs. 2011-06-14 12:50:33 +00:00
Mike Hearn
0953e79cb0 Improve the documentation for the PingService. Patch by Gary Rowe. 2011-06-14 12:49:19 +00:00
Mike Hearn
6a4d0e866f Fix an assertion in Wallet to use the correct type. 2011-06-14 12:39:18 +00:00
Mike Hearn
a955187e04 Refactor the serialization logic:
- Extract serialization code out of NetworkConnection into a new class
- Created classes for Ping and VerAck messages
- Use reflection to create new message classes
- Add a few test cases to exercise the BitcoinSerializer class

Patch by Noa Resare.
2011-06-13 10:27:15 +00:00
Xiaofeng Guo
3caa419aab Add maven support for bitcoinj.
After this CL, you can use "mvn install" to build / test the project.
2011-06-10 16:46:32 +00:00
Mike Hearn
0e513c0c02 Add BoundedOverheadBlockStore. This is suitable for usage on constrained devices like Android phones that cannot afford to store the chain headers in RAM.
On a MacBook pro with this store, the chain can be downloaded at about 2000 blocks per second. Difficulty transitions are not optimized but take around 50 msec. On a Google Nexus S the chain can be downloaded (via wifi) at 200 blocks per second and difficulty traversals take 2 seconds. At this time the profiles on both devices are dominated by verification costs, not storage.
2011-05-30 16:14:28 +00:00
Mike Hearn
3edb242d5a Don't create the log line for message dumping in NetworkConnection unless that level of debug logging is enabled. This was dominating the profiles on Android. 2011-05-30 15:53:34 +00:00
Mike Hearn
74152c6e70 Add FileInputStream/FileOutputStream accepting versions of the wallet load/save methods. This makes things a bit easier on Android. 2011-05-30 15:52:37 +00:00
Mike Hearn
06c84c2c23 Fix a bug in Base58 decoding. Refactor how it is handled and introduce a new DumpedPrivateKey class that can be used to load keys generated by the dumpprivkey RPC. Use a new VersionedChecksummedBytes class to share the code. 2011-05-24 21:42:08 +00:00
Mike Hearn
ab7351ff78 Fix bug in Base58.decode that caused failures when the MSB of the decoded byte array was 1. Thanks to BitterTea and sipa for help with debugging this. 2011-05-24 20:19:18 +00:00
Mike Hearn
5a3d188d03 Add some error messages to the Address exceptions for easier debugging 2011-05-24 20:12:10 +00:00
Mike Hearn
bef08ade88 Minor refresh of the algorithm descriptions at the top of Wallet.java 2011-05-23 12:51:14 +00:00
Mike Hearn
bebc83f64c Improve unit tests to verify the arguments to the onDeadTransaction event. Fixed a bug revealed by this.
Credit to miron@google.com for spotting the problem.
2011-05-23 12:44:32 +00:00
Mike Hearn
cb5025b987 Add a unit test for the case where the block chain overrides a currently pending transaction. This is an edge case that should only occur when the user executes a Finney attack against somebody else.
Fix the bug that Miron pointed out. Resolves comments on r76.
2011-05-23 12:13:25 +00:00
Mike Hearn
846412aa00 Delete typo. 2011-05-23 08:37:26 +00:00
Mike Hearn
fe8afb46f7 Add SLF4J to the unit test classpath. Fixes issue 21. 2011-05-19 12:47:56 +00:00
Mike Hearn
1fd8067322 Delete an unused method. 2011-05-17 15:43:26 +00:00
Mike Hearn
63e70998c7 Fix javadoc rule in ant. Refresh Javadocs. 2011-05-17 15:31:46 +00:00
Mike Hearn
32436ddc7f Another rewrite of the re-org handling:
- Split the unit tests for this into a separate file
- Add more tests for double spends, reversal of external spends and more edge cases
- Handle the case where transactions should be resurrected after a re-org
- Handle the case where transactions are overridden by double spends

Should address [some of] the points Miron raised during his review. There are likely still bugs but it's a lot closer to correct than before.
2011-05-17 15:22:28 +00:00
Mike Hearn
eee6e03416 Fix the ant build.xml file to include SLF4J 2011-05-04 11:57:50 +00:00
Mike Hearn
cd10099d3f Some small renamings in BlockChain. Log but don't throw in TransactionOutput.isMine() if the script is unparseable. Suggestions from Miron. 2011-05-02 13:20:15 +00:00
Mike Hearn
62302611f6 Simplify the findSplit code, suggested by miron@google.com 2011-05-02 13:13:31 +00:00
Mike Hearn
068dcba122 Switch to using SLF4J + the simple logger, allowing people to integrate BitCoinJ with whatever logging system they
are already using.

Resolves issue 16.
2011-05-02 12:35:10 +00:00