Mike Hearn
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.
2011-04-25 21:51:59 +00:00
Mike Hearn
90c7ec80ff
Replace for loop with an iterator to make the removal case clearer. Extend the unit test a bit.
...
This code will all be changing more in future anyway.
2011-04-21 06:07:43 +00:00
Mike Hearn
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
Patch from Thilo Planz.y
2011-04-21 05:48:27 +00:00
Mike Hearn
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.
...
Fixes issue 1.
2011-04-20 15:47:41 +00:00
Mike Hearn
062f87553a
Implement ASN.1 key export. Patch from Thilo Planz.
...
Resolves issue 8.
2011-03-31 20:38:33 +00:00
Mike Hearn
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.
2011-03-28 17:59:10 +00:00
Mike Hearn
65b80720bd
Move the next header creation method out of BlockTest and into Block, as it is useful for other unit tests as well.
2011-03-27 22:32:17 +00:00
Mike Hearn
dbab159551
First part of block chain handling rework.
...
- Store the block chain using a get/put interface keyed by hash,
so we can add disk storage later.
- Add unit tests for difficulty transitions. Move some stuff into
NetworkParameters to make that easier.
- Track the best chain using total work done. Inform the wallet
when a re-org takes place. Wallet currently doesn't do anything
with this beyond informing the event listeners.
With this patch we're getting closer to a correct SPV implementation.
2011-03-24 09:14:32 +00:00
Mike Hearn
30327cd888
Implement block work calculations, add a test. Small internal refactoring of BlockChain in preparation for bigger changes.
2011-03-22 14:50:00 +00:00
Mike Hearn
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.
2011-03-15 13:58:52 +00:00
Mike Hearn
a504328044
Improve VarInt: simplify, fix some minor bugs and increase test coverage.
2011-03-13 21:29:25 +00:00
Mike Hearn
29e60a460d
Add a getValueSentFromMe() to complement getValueSentToMe() and some unit tests.
...
BUG=2
2011-03-12 17:57:37 +00:00
Mike Hearn
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
2011-03-08 15:23:06 +00:00
Mike Hearn
fbb93e4c27
Initial checkin of BitCoinJ
2011-03-07 10:17:10 +00:00