3
0
mirror of https://github.com/Qortal/altcoinj.git synced 2025-01-30 23:02:15 +00:00
Commit Graph

454 Commits

Author SHA1 Message Date
Mike Hearn
fa746716ce Another README fix 2012-05-31 11:08:27 +02:00
Mike Hearn
8dfa21099c Fix PingService reference in the README file. 2012-05-31 10:26:07 +02:00
Mike Hearn
73e640e3b3 Take out a bogus assert that did not do what I thought it did. 2012-05-30 16:17:45 +02:00
Mike Hearn
d9c2aabf66 Note about running time in BlockStore.getChainHead(). Resolves issue 191. 2012-05-30 00:15:06 +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
adb46c7dcb Make isAvailableForSpending and markAsUnspent public. Add JavaDocs for them. Resolves issue 193. 2012-05-29 23:58:31 +02:00
Mike Hearn
7705bd59a4 Version 0.6-SNAPSHOT 2012-05-21 16:46:44 +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
e42063806c Write+rename wallet files. 2012-05-21 15:31:21 +02:00
Mike Hearn
08f5630cf9 Update ToyWallet to spongycastle. 2012-05-18 17:22:47 +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
23a960e0f4 Fix a bug revealed by the better wallet consistency checks - after reprocessing an unincluded transaction at the end of a re-org, check if connected transactions now need to be moved to the spent pool. 2012-05-15 23:45:59 +02:00
Mike Hearn
2081c2234b Ignore blocks that are sent to us which we never requested. Updates issue 180. 2012-05-15 22:39:20 +02: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
3d5a7ea7ec Don't use peers that claim to have a block chain and then report a height of zero. These are probably buggy reimplementations of the protocol. 2012-05-14 20:52:06 -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
0a3189c3b4 WalletTool: fix --help and allow privkeys/pubkeys to be parsed as hex or base58. 2012-05-02 17:56:05 +02:00
Mike Hearn
1087d837e5 Log the IP being used to connect to IRC. 2012-05-02 17:17:55 +02: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
Miron Cuperman
6a82462d2d More Wallet consistency checks 2012-05-01 18:45:48 -07:00
Mike Hearn
a0da0c548f Refactor transaction signing code so users can get the signature hash of an arbitrary input.
Also add/fix comments in bitcoin.proto and make the Transaction.pool field optional.
2012-04-15 19:07:30 +02: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
9fa25f990b Make it easier to understand the wallet code by using an enum instead of a bool for TransactionInput.connect() 2012-04-15 16:26:11 +02:00
Mike Hearn
6deeaaf8ac One more minor consistency cleanup. 2012-04-15 16:15:17 +02:00
Mike Hearn
73a5d95bea Introduce additional comment and some minor reformatting / simplification of the protobuf serializer. 2012-04-11 23:08:39 +02:00
Mike Hearn
8796705987 Better internal sanity checking in the wallet deserializer and simplify the code. Also reformat and introduce another helper method. 2012-04-10 23:57:55 +02:00
Mike Hearn
0fb81a7288 Fix output directory of protobuf regeneration. 2012-04-08 14:27:08 +02:00
Mike Hearn
513a75b4ba Download transactions from whichever peer announced them first. 2012-04-08 14:26:53 +02:00
Mike Hearn
2023e05d7e Fix detection of end of block chain download when syncing a wallet with no keys. 2012-04-08 00:13:01 +02:00
Mike Hearn
71754929e4 Support pubkey only keys in the protobuf serializer. 2012-04-07 23:45:40 +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
0ab36f7839 Some more wallet-tool fixes/improvements. 2012-04-06 18:41:53 +02:00
Mike Hearn
b008cd0388 Don't validate difficulty transitions on the testnet as there was a recent rule change, and nobody cares about security on testnet anyway. 2012-04-06 18:41:40 +02:00
Mike Hearn
40e4ac0a49 Restore error message that got accidentally taken out. 2012-04-06 18:40:51 +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
577318b9ea Start auto-migration to protobuf wallets. 2012-04-06 16:02:00 +02:00
Mike Hearn
265c76db59 Don't crash if trying to print a transaction with no inputs 2012-04-06 16:01:44 +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
Mike Hearn
ece8f548a9 Support for sending money from wallet-tool. 2012-04-06 14:37:49 +02:00
Mike Hearn
b3e092a5e8 More logging in Peer/PeerGroup 2012-04-06 14:36:54 +02:00
Mike Hearn
c400a7c756 Peer.java: change trace to info on receiving a block
Wallet.java: print more info to logs if wallet sizes are inconsistent
2012-04-06 13:39:41 +02:00
Mike Hearn
b7379d562f WalletTool improvements:
- Can now wait for blocks, wallet-relevant transactions or for wallet balance to meet a given condition
 - Simplified the code somewhat
2012-04-05 20:34:31 +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
6c1e3aa49a Comment fixes 2012-04-05 12:15:05 +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
6368862ffe Clear out some more FindBugs warnings. 2012-04-04 23:52:02 +02:00