Commit graph

  • a955187e04 Refactor the serialization logic: Mike Hearn 2011-06-13 10:27:15 +00:00
  • 3caa419aab Add maven support for bitcoinj. Xiaofeng Guo 2011-06-10 16:46:32 +00:00
  • 0e513c0c02 Add BoundedOverheadBlockStore. This is suitable for usage on constrained devices like Android phones that cannot afford to store the chain headers in RAM. Mike Hearn 2011-05-30 16:14:28 +00:00
  • 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. Mike Hearn 2011-05-30 15:53:34 +00:00
  • 74152c6e70 Add FileInputStream/FileOutputStream accepting versions of the wallet load/save methods. This makes things a bit easier on Android. Mike Hearn 2011-05-30 15:52:37 +00:00
  • 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. Mike Hearn 2011-05-24 21:42:08 +00:00
  • 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. Mike Hearn 2011-05-24 20:19:18 +00:00
  • 5a3d188d03 Add some error messages to the Address exceptions for easier debugging Mike Hearn 2011-05-24 20:12:10 +00:00
  • bef08ade88 Minor refresh of the algorithm descriptions at the top of Wallet.java Mike Hearn 2011-05-23 12:51:14 +00:00
  • 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. Mike Hearn 2011-05-23 12:44:32 +00:00
  • 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. Mike Hearn 2011-05-23 12:13:25 +00:00
  • 846412aa00 Delete typo. Mike Hearn 2011-05-23 08:37:26 +00:00
  • fe8afb46f7 Add SLF4J to the unit test classpath. Fixes issue 21. Mike Hearn 2011-05-19 12:47:56 +00:00
  • 1fd8067322 Delete an unused method. Mike Hearn 2011-05-17 15:43:26 +00:00
  • 63e70998c7 Fix javadoc rule in ant. Refresh Javadocs. Mike Hearn 2011-05-17 15:31:46 +00:00
  • 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 Mike Hearn 2011-05-17 15:22:28 +00:00
  • eee6e03416 Fix the ant build.xml file to include SLF4J Mike Hearn 2011-05-04 11:57:50 +00:00
  • cd10099d3f Some small renamings in BlockChain. Log but don't throw in TransactionOutput.isMine() if the script is unparseable. Suggestions from Miron. Mike Hearn 2011-05-02 13:20:15 +00:00
  • 62302611f6 Simplify the findSplit code, suggested by miron@google.com Mike Hearn 2011-05-02 13:13:31 +00:00
  • 068dcba122 Switch to using SLF4J + the simple logger, allowing people to integrate BitCoinJ with whatever logging system they are already using. Mike Hearn 2011-05-02 12:35:10 +00:00
  • a32a612630 Add DNS based discovery. Patch from John Sample. Resolves issue 18. Rename IRCPeers to PrintPeers, add DNS, add timing measurements. Mike Hearn 2011-05-02 12:14:35 +00:00
  • 71604505ad Allow user to provide NetworkConnection with a socket timeout. Resolves issue 17. Patch from John Sample. Mike Hearn 2011-05-02 11:58:51 +00:00
  • e43ad1f754 Implement support for IRC peer discovery. Patch contributed by John Sample. Mike Hearn 2011-05-02 11:54:15 +00:00
  • 37cb9cb6e5 Make Base58 throw on decode if the input is not valid base58, add test. Add a decodeChecked method that uses the last 4 bytes as a checksum, for IRC support. Mike Hearn 2011-05-02 11:44:14 +00:00
  • 3e267f1327 Set mime types on new doc files Mike Hearn 2011-04-25 22:07:30 +00:00
  • bdf7771fc1 Add some HTML files I missed in the last checkin. Mike Hearn 2011-04-25 22:05:18 +00:00
  • ccef45c6c9 Refresh JavaDocs. Mike Hearn 2011-04-25 22:01:15 +00:00
  • c20118d871 Second part of supporting block chain re-orgs. Wallet now organizes transactions into four pools: unspent, spent, pending and inactive. Transactions track which blocks they have appeared in. BlockChain provides the Wallet with both segments of chain and it then moves transactions between the pools as necessary. Mike Hearn 2011-04-25 21:56:16 +00:00
  • 86d7b15f8c Some small protocol fixes. Correct serialization of version and address messages. Mike Hearn 2011-04-25 21:52:33 +00:00
  • 84dcfecb5d Allow formatting of negative BitCoin amounts, add a test for this. Flush stderr/stdout when logging to try and keep them in sync. Whitespace fixes. Mike Hearn 2011-04-25 21:51:59 +00:00
  • 1e2f3ae3e2 Split the BlockChain.add method out into some smaller functions. Mike Hearn 2011-04-21 09:19:05 +00:00
  • 90c7ec80ff Replace for loop with an iterator to make the removal case clearer. Extend the unit test a bit. Mike Hearn 2011-04-21 06:07:43 +00:00
  • 7a4dfd1dc2 Test that you can sign with the roundtrip key and verify with the original key, and vice versa. See http://code.google.com/p/bitcoinj/source/detail?r=51 Mike Hearn 2011-04-21 05:48:27 +00:00
  • b792d40653 Use BufferedInputStream in DiskBlockStore. Fixes issue 14. Mike Hearn 2011-04-20 16:39:32 +00:00
  • aff7fda17d Add a function/some tests for string to nanocoin conversions and vice-versa, along with a TODO to clean this whole thing up. Patch from Thilo Planz. Mike Hearn 2011-04-20 15:47:41 +00:00
  • 062f87553a Implement ASN.1 key export. Patch from Thilo Planz. Mike Hearn 2011-03-31 20:38:33 +00:00
  • a95949626e Implement a hashCode() method on StoredBlock. Mike Hearn 2011-03-31 20:25:36 +00:00
  • 668b176283 Add a DiskBlockStore and associated unit tests. This removes the need to download the block chain from scratch each time a program is started up. Mike Hearn 2011-03-28 17:59:10 +00:00
  • 65b80720bd Move the next header creation method out of BlockTest and into Block, as it is useful for other unit tests as well. Mike Hearn 2011-03-27 22:32:17 +00:00
  • 88212f6bfa Make BlockStore and StoredBlock public. Move StoredBlock building into the class itself. Mike Hearn 2011-03-27 21:31:55 +00:00
  • 990f367ef4 Require block stores to track the best chain head, add for the MemoryBlockStore. Mike Hearn 2011-03-27 21:17:46 +00:00
  • ce927609ba Add synchronized to a couple of methods. Bit more style consistency in Wallet. Mike Hearn 2011-03-27 21:16:16 +00:00
  • a9d3ca45e5 Add serialVersionUID to StoredBlock Mike Hearn 2011-03-27 21:15:15 +00:00
  • af371677fd Take some Block setters out of the public API. The ability to create/solve blocks is intended only for unit testing in this library. Mike Hearn 2011-03-25 21:19:52 +00:00
  • bb017a5dab Change the order of the messages in the version handshake. This fixes connections to BitCoin nodes beyond v0.30.20.2 which are "shy", that is, they do not announce their version on accepting a connection. The intent of that change is to make port scanning harder, though it is questionable whether this really is effective. Mike Hearn 2011-03-25 20:41:26 +00:00
  • 513eff26f9 Don't serialize the block hash, recalculate on demand using getHash() Mike Hearn 2011-03-25 17:28:03 +00:00
  • 9b78765975 Remove obsolete comment. Mike Hearn 2011-03-24 17:41:16 +00:00
  • 7f30e20170 Implement the equals method on StoredBlock and use it. Mike Hearn 2011-03-24 17:37:40 +00:00
  • ebfd7e4147 Refresh JavaDocs Mike Hearn 2011-03-24 09:25:54 +00:00
  • dbab159551 First part of block chain handling rework. Mike Hearn 2011-03-24 09:14:32 +00:00
  • 30327cd888 Implement block work calculations, add a test. Small internal refactoring of BlockChain in preparation for bigger changes. Mike Hearn 2011-03-22 14:50:00 +00:00
  • 57caa5503d Some changes to how block chain download is done: - Progress is now made available - Fixes bug: can now wait for downloads of chains < 500 blocks - Flesh out VersionMessage parsing, send BitCoinJ name in subVer field Mike Hearn 2011-03-15 18:06:15 +00:00
  • c40b7ce668 Refresh JavaDocs. Mike Hearn 2011-03-15 14:04:38 +00:00
  • 5e2e48eb5a Add the start of unit tests covering chain splits/reorgs, along with supporting code. The tests don't pass yet so they are marked @Ignore. Mike Hearn 2011-03-15 13:58:52 +00:00
  • d58ad311fe Minor whitespace/doc changes. Mike Hearn 2011-03-15 13:56:14 +00:00
  • 3d301fd1fc Scan coinbase transaction outputs when receiving a block, in case generated blocks send coins to an address we have in the wallet. Mike Hearn 2011-03-15 13:55:47 +00:00
  • 0bacae85fb Improve JavaDocs in ECKey to try and help people understand the difference between pubkeyhashes and pubkeys. The getting started guide was also updated. Mike Hearn 2011-03-15 13:54:58 +00:00
  • c9bc430f53 Add a wallet dumping tool, toString() on the Wallet object. Mike Hearn 2011-03-15 13:39:40 +00:00
  • a7015bd0d4 Change serialVer on Block. Patch from Andreas. Mike Hearn 2011-03-14 09:58:06 +00:00
  • 845224c8d5 Eliminate some warnings from IntelliJ inspections. There are still quite a few but they are all harmless. Mike Hearn 2011-03-13 21:39:44 +00:00
  • a504328044 Improve VarInt: simplify, fix some minor bugs and increase test coverage. Mike Hearn 2011-03-13 21:29:25 +00:00
  • debd034c71 Add a serialVersionUID to other classes that were missing them. Thanks to Andreas for the report. BUG=4 Mike Hearn 2011-03-13 12:49:30 +00:00
  • 7310e294f9 Add a serialVersionUID to TransactionOutPoint. Thanks to Andreas for the report. BUG=4 Mike Hearn 2011-03-13 12:46:47 +00:00
  • 29e60a460d Add a getValueSentFromMe() to complement getValueSentToMe() and some unit tests. BUG=2 Mike Hearn 2011-03-12 17:57:37 +00:00
  • 99d155e0fe Control API logging using the bitcoinj.logging global property. Mike Hearn 2011-03-08 17:48:03 +00:00
  • f97cde4c34 Seek past garbage before the message header starts. It's unclear how this occurs but is probably an issue in the official implementation (which also does this seeking). Mike Hearn 2011-03-08 17:36:52 +00:00
  • 617c31dd6f Remove some Java 6isms. Mike Hearn 2011-03-08 15:33:52 +00:00
  • 4003eee3fe Add getters/setters and a solve method to the Block object. Use this in a new proof of work unit test. Introduce a unit test NetworkParameters that has very easy difficulty. Correct some assertTrue(false) type checks to use fail() instead. Make ALLOWED_TIME_DRIFT non-public until I have a good explanation in the javadocs of what it's for. Simplify Block.equals Mike Hearn 2011-03-08 15:23:06 +00:00
  • 38bf9a8a80 Change how socket errors are handled in NetworkConnection and Peer. This allows for cleaner shutdown and simplifies the code a bit. Mike Hearn 2011-03-08 13:18:33 +00:00
  • 66321804e7 Enable some simple checks of transaction ordering in the block verification. Mike Hearn 2011-03-08 12:10:08 +00:00
  • fdde166813 Move the banner print in the PingService until after the blockchain. Mike Hearn 2011-03-08 12:09:35 +00:00
  • c3f5496a8e Fix a typo in ECKey JavaDocs. Remove the timestamp from the generated JavaDoc output to minimize subversion diffs in future. Make the broadcastTransaction method of Peer package private. It's no longer needed to send coins. Mike Hearn 2011-03-07 13:37:47 +00:00
  • fbb93e4c27 Initial checkin of BitCoinJ Mike Hearn 2011-03-07 10:17:10 +00:00
  • d1036b101f Initial directory structure. Mike Hearn 2011-03-04 21:36:40 +00:00