Mike Hearn
643088145e
Clear out some FindBugs warnings.
2012-06-08 17:53:50 +02:00
Mike Hearn
335863c75d
Add some helpers for creating pubkey-only outputs.
...
Allow spending of pubkey outputs. There are unit tests but not manually tested yet.
Implement toString() logic for printing pubkey inputs/outputs.
Don't consider coinbase transactions relevant until Jims work is in.
Support sending to pubkeys in wallet-tool
2012-06-07 10:57:34 +02:00
Mike Hearn
e863d01545
Fix receiving of pending transactions, it was broken after the memory pool changes in the case when a tx was received first on a non download peer.
2012-06-05 14:26:18 +02:00
Mike Hearn
da8dba8b23
Re-write block chain download handling to avoid parallel chain downloads occurring. Avoids big slowdowns when a block is solved during the chain download. Resolves issue 180.
2012-06-05 12:26:41 +02:00
Mike Hearn
6ade5c38cc
Update wallet tx confidence data for blocks that do not contain any relevant transactions. Resolves issue 197.
...
TESTED=synced a wallet with a mainnet key and watched depth/work rise as new blocks were solved
2012-06-03 15:31:21 +02:00
Mike Hearn
5deecef64c
Update a TestUtils helper to allow solved blocks to have transactions in them. Rewrite lastSeenBlockHash test to use it and eliminate a todo.
2012-06-03 14:20:02 +02:00
Jim Burton
80f141cbf5
TransactionConfidence changes (coinbase phase 2) + Mike's feedback
2012-06-01 16:14:18 +02:00
Fireduck
61fba05d3d
Makes Wallet easy to extend.
...
Adds WalletProtobufHelper, which is an easy class to extend
to add extensions to the wallet serialization.
Modified WalletProtobufSerializer to use that helper.
2012-06-01 15:35:16 +02:00
Mike Hearn
1f96f850e0
Automatically set up fast catchup time on a PeerGroup when wallets are added. Resolves issue 183.
2012-05-30 00:08:18 +02:00
Mike Hearn
e375270d6b
Remove deduplication code. It is dead for a long time now already.
2012-05-21 16:10:28 +02:00
Mike Hearn
0739a6f674
Port to the latest BouncyCastle API and switch to the SpongyCastle lightweight API. It has the following benefits:
...
- Keeps us up to date with the crypto library
- Resolves the need for an Android artifact by using a renamed lib
- Switches to the lightweight API so minimizes our dependencies, which is also required for the native branch to be merged
Resolves issue 171
2012-05-18 17:03:55 +02:00
Jim Burton
6c31abd698
coinbase-tx phase1 complete (add blockheight to wallet and protobuf)
2012-05-17 14:18:31 +01:00
Mike Hearn
1b1457449a
Add a BitcoinURI.convertToURI variant that takes a String instead of an Address. Remove test for null param -> IllegalArgumentException as that's not consistent with the rest of the library. Resolves issue 152.
2012-05-14 20:57:14 -07:00
Mike Hearn
c41b6d74fa
Better base58 encoding/decoding that resolves some edge cases. Patch from Vasile Rotaru.
2012-05-09 11:12:45 -07:00
Mike Hearn
ff770a8d83
Add an explicit test in WalletTest.blockChainCatchup for confidence levels.
2012-05-02 16:59:50 +02:00
Miron Cuperman
fe9cbf8b7b
Wallet.isConsistent tests
...
Resolves issue 184.
2012-05-01 18:57:03 -07:00
Mike Hearn
7f5c8dc3a8
Set outpoint.fromTx during TransactionInput.connect even in the conflict case. Resolves issue 181. Also introduce a helper for creating double spends and rewrite the test case for this in WalletProtobufSerializer to cover more codepaths. Add a comment noting that in the double spending case the overriding transaction isn't presently being stored in the wallet.
2012-04-15 17:51:31 +02:00
Mike Hearn
513a75b4ba
Download transactions from whichever peer announced them first.
2012-04-08 14:26:53 +02:00
Mike Hearn
cf30280767
Catch up with new testnet rules. Resolves issue 164.
2012-04-07 23:28:18 +02:00
Mike Hearn
2f904e7a37
Fix unit test.
2012-04-07 17:02:00 +02:00
Mike Hearn
4e3d5313e6
Fix issue 166. Consider intra-block dependencies when deciding whether to send transactions to the wallet.
2012-04-06 18:03:07 +02:00
Mike Hearn
a170372562
Add a static method to go from string ID to NetworkParameters and use it to simplify the WalletProtobufSerializer API.
2012-04-06 14:58:36 +02:00
Jonny Heggheim
7bf9724079
Fix issue 174, replaced all File usage with TemporaryFolder rule in JUnit.
2012-04-05 17:10:36 +02:00
Mike Hearn
d82f102b4b
Introduce a new MemoryPool abstraction and use it for tracking peer confidences. This replaces the previous, less explicit system which had each peer try and track all transactions it'd seen in a per-peer pool.
...
This makes experimental usage of weak references and a reference queue to make the MemoryPool only bother tracking transactions that were retained by some other part of the program, ie, because they were relevant to the wallet. This stops the memory usage from bloating due to lots of large transactions flying around the network whilst still letting us intelligently monitor how many peers announced transactions without tight coupling between components.
Note that we still need the cap on the pool size because otherwise you could DoS a bitcoinj based program by sending it lots of fake transactions it found interesting. The DoS potential still exists but is a bit different now.
2012-04-05 12:14:36 +02:00
Mike Hearn
dc42630526
Invoke transaction confidence listeners when a new peer broadcasts the given transaction. Use EventListenerInvoker to run the listeners.
2012-04-05 12:12:17 +02:00
Mike Hearn
8fc09f5808
Make network parameters to BitcoinURI optional.
2012-04-02 17:36:47 +02:00
Mike Hearn
9075561993
Support for discovering the network parameters from an address. Different exception type for wrong network parameters so chain-crossing can be handled differently.
2012-04-02 17:10:41 +02:00
Mike Hearn
3e5f796407
Add a dependency on Guava base libraries and replace a few asserts with Preconditions, which means they will always run including in production code. Fix a bug revealed by this (IntelliJ does not run unit tests with assertions enabled!)
2012-04-02 13:40:20 +02:00
Miron Cuperman
9474eaa0d4
Change NetworkConnection API to separate connect method.
...
This allows the Peer to close the connection earlier when connect()
takes a long time.
Resolves issue 161.
2012-03-26 15:23:14 -07:00
Miron Cuperman
576650142c
Lock in BOBS on creation, do not swallow non-IO exceptions
2012-03-23 12:53:54 -07:00
Miron Cuperman
4b1c32584f
Lock BlockStore files to prevent concurrent access.
...
Resolves issue 153.
2012-03-23 10:53:54 -07:00
Mike Hearn
0e52c98c45
Use the standard Maven directory layout, rename "lib" to "core". Mavenize submodules.
2012-03-13 18:57:03 +01:00