3
0
mirror of https://github.com/Qortal/altcoinj.git synced 2025-02-12 02:05:53 +00:00

Commit Graph

  • 03db1a9636 Merge branch 'master' of https://code.google.com/p/bitcoinj Mike Hearn 2012-02-10 15:49:03 +01:00
  • 6459f15202 First cut at a wallet manipulation tool. Mike Hearn 2012-02-10 15:47:10 +01:00
  • 0552acc286 Lower logging level for unrecognized script outputs. Mike Hearn 2012-02-10 15:46:35 +01:00
  • 8c2b46ea51 Put the creation timestamp in ECKey toString output. Mike Hearn 2012-02-10 15:46:12 +01:00
  • 781cb1f8d5 Use a slightly more sensible startup sequence for BoundedOverheadBlockStore to avoid log spam when creating a fresh chain. Mike Hearn 2012-02-10 15:45:43 +01:00
  • 7cc23e3e6b Improved Transaction.toString Miron Cuperman 2012-02-09 10:28:15 -08:00
  • 96a1e87f47 Correct a comment Mike Hearn 2012-02-09 16:15:00 +01:00
  • 82e426a7eb Print outpoint data in Transaction toString() output Mike Hearn 2012-02-09 16:14:45 +01:00
  • 23279aff5f Change order of outpoint printing to be more consistent with Bitcoin practice Mike Hearn 2012-02-09 16:14:29 +01:00
  • 9ba77a0d68 Prevent Derby unit test from writing a pointless log file. Mike Hearn 2012-02-07 23:00:09 +01:00
  • d5aad396a3 Use temp dir under target/ for derby test, ensure we actually do delete the directory afterwards. Resolves issue 129. Mike Hearn 2012-02-07 22:49:40 +01:00
  • 6f8ab7b40b Add a big pile of JavaDocs to the WalletProtobufSerializer. Also make its c'tor private, so usage is clearer. Mike Hearn 2012-02-07 22:35:11 +01:00
  • db60bfc731 Provide network parameter IDs as constant strings. Make the "id" field of NetworkParameters private and make the getter upgrade the object using port as a heuristic if the field isn't present. Add a unit test to ensure we can convert old wallets to protobuf form. Resolves issue 134. Mike Hearn 2012-02-07 22:34:39 +01:00
  • 2b3e77bea9 Make a couple more Wallet methods public. Mike Hearn 2012-02-07 21:49:12 +01:00
  • 11a87317a4 Split transaction creation into building a template and then completing it. Completing a tx means adding inputs and possibly a change output to make the transaction valid. Also add a convenience addOutput() overload to Transaction. This makes it easier to create multi-sends. Mike Hearn 2012-02-07 21:47:21 +01:00
  • b43b686264 Use finer grained locking in the BlockChain to make accessing the chain head responsive even whilst the chain is downloading and the object is under heavy load. This takes getChainHead() out of the profiles for ToyWallet and allows for removing the code added there to work around this issue. Mike Hearn 2012-02-05 23:44:43 +01:00
  • 7369c398ff Improve a comment and make Wallet.receivePending() public. Mike Hearn 2012-02-03 15:42:30 +01:00
  • c1cb5c10d5 Improve a log message Mike Hearn 2012-02-03 14:09:43 +01:00
  • fff2034408 Copy test wallet into build directory, fixes a failing test case. Mike Hearn 2012-02-03 14:00:12 +01:00
  • b0739df2e5 Expose hashTransactionForSignature. The API will likely change in future. Mike Hearn 2012-02-02 18:21:28 +01:00
  • b72c170086 API for setting version messages on outbound connections, and implementing BIP 14. Resolves issue 105. Mike Hearn 2012-02-02 17:34:52 +01:00
  • 7f82613559 Migrate old wallets to use transaction confidences, as much as possible, and add a unit test for deserializing old wallets. Mike Hearn 2012-02-02 16:17:54 +01:00
  • be8d3c3896 Get rid of some warnings Miron Cuperman 2012-02-02 14:51:31 -08:00
  • 69ee4c7729 Be lenient in parsing tx confidence protobuf, store pubkeys, cleanup Miron Cuperman 2012-01-26 10:43:15 -08:00
  • 1c28bd3972 Persist TransactionConfidence to protobuf Miron Cuperman 2012-01-25 10:40:20 -08:00
  • 3d470ec3f2 Make BlockTest.testDate pass outside of CET. Mike Hearn 2012-02-02 15:37:24 +01:00
  • 9afa4bf6a5 Create the localhost address without relying on a method that does DNS lookups behind the scenes. Resolves issue 120. Mike Hearn 2012-02-02 15:00:46 +01:00
  • 6b2275890a Invoke onCoinsSent() when receiving a pending transaction that spends the wallets coins. Mike Hearn 2012-02-02 14:49:46 +01:00
  • cf76cf064f Add a comment to the EventListenerInvoker class. Mike Hearn 2012-02-02 14:48:23 +01:00
  • 1a4acc18be Pubkeys are 65 bytes, not 32. Mike Hearn 2012-01-26 18:40:24 +01:00
  • ad329d7a34 Callbacks for when a transaction in the chain is seen that spends coins from our wallet, not just to. Introduce EventListenerInvoker to simplify the pattern by which event listeners can delete themselves safely whilst running. Update the ToyWallet app to accept a public key:creation time pair on the command line and show all relevant transactions, to demonstrate (very crudely) the watching functionality. Mike Hearn 2012-01-26 16:25:16 +01:00
  • 1ff81a3243 Slight redesign of the ECKey API to allow you to have public only ("watching") keys. Mike Hearn 2012-01-26 16:23:29 +01:00
  • f2d804d5cb Fix a dumb seconds/milliseconds mismatch bug in Block.getTime(). Add a unit test. Mike Hearn 2012-01-26 15:25:15 +01:00
  • 67526ca8e2 Add an accessor to set the key creation time, along with another convenience c'tor to make the API a bit less inconsistent. Resolves issue 117. Mike Hearn 2012-01-25 17:20:18 +01:00
  • 63cef24fe4 Port Wallet to use getAppearsInHashes(), which resolves some failing unit tests. Mike Hearn 2012-01-25 16:58:31 +01:00
  • 3eb12c8e97 Merge branch 'master' of https://code.google.com/p/bitcoinj Mike Hearn 2012-01-21 17:56:53 +01:00
  • 8be3a7a027 Follow the protocol change that occurs on Feb 20th Mike Hearn 2012-01-21 17:56:19 +01:00
  • ed5adf3ea8 Disable the gen source directory for now as it is unused Miron Cuperman 2012-01-19 08:41:41 -08:00
  • 891cdcc02d Remove dependence of WalletProtobufSerializer on BlockStore, migrate to Transaction.appearsInHashes Miron Cuperman 2012-01-17 11:06:01 -08:00
  • c7fd805e47 Provide a sendCoinsAsync that returns immediately instead of waiting for the tx to be broadcast. Change PeerGroup.broadcastTransaction to return a Future<Transaction> and only consider the tx to be broadcast once it was written to at least one peer directly (not waiting for a response to an inv). Re-plumb the peer group thread to poll for tasks when there are active peers. Mike Hearn 2012-01-16 19:16:16 +01:00
  • 3fa5c89b3e Set newly created wallet transactions to have NOT_SEEN_IN_CHAIN confidence rather than UNKNOWN. Mike Hearn 2012-01-16 17:47:52 +01:00
  • e6612ad112 Add a .gitignore file that contains the target directory. Mike Hearn 2012-01-16 17:44:10 +01:00
  • 5d27257b7a Rationalize protobuf Pool enum Miron Cuperman 2012-01-11 16:29:09 -08:00
  • b29f669bca Fixes to protobuf building from Gary Miron Cuperman 2012-01-11 16:04:14 -08:00
  • 775f5241e3 Allow building without protobuf-compiler installed Miron Cuperman 2012-01-11 13:34:14 -08:00
  • 9f90ae2f0e Fix test, upgrade to protobuf 2.4.1, doc Miron Cuperman 2012-01-11 12:41:14 -08:00
  • 1a2ce7d982 Fixes based on input from Mike, fix invariant checking, fix spentBy Miron Cuperman 2012-01-11 10:04:00 -08:00
  • a8fd0d474d Wallet protobuf cleanup. Miron Cuperman 2012-01-10 11:10:15 -08:00
  • 319c52b2a6 Read Wallet from protobuf stream Miron Cuperman 2012-01-06 16:31:43 -08:00
  • 6af16c863c Protobuf serialization for Wallet Miron Cuperman 2012-01-06 14:50:34 -08:00
  • 0e7e583626 Fix merge mistake, fix PeerGroup.stop Miron Cuperman 2012-01-09 12:59:44 -08:00
  • 76ea1d35e9 Repair the damage caused by a bad merge in rev 56489f9fc60c Mike Hearn 2012-01-09 17:59:45 +01:00
  • 32f41dc1a9 Address some review comments from Miron. Mike Hearn 2012-01-09 15:42:43 +01:00
  • 35ec0b669d Wallet side of the quick hack (oops) Mike Hearn 2011-12-27 23:14:11 +00:00
  • 5ce1d21e4c Quick hack (unfinished API) to clear out wallet transactions so you can replay the wallet in case of bugs, like forgetting to save the wallet when you need to. Mike Hearn 2011-12-27 23:10:32 +00:00
  • edb3814b56 Couple of minor concurrency fixes. Mike Hearn 2011-12-27 23:05:55 +00:00
  • de6d27aef8 Announce pending transactions in wallets when a peer connects (both self-created spends and relevant received transactions). Allow creation of transactions without broadcast, for offline wallets. Mike Hearn 2011-12-27 21:52:00 +00:00
  • 2ef9fa389c Add an ugly toy wallet app, which will evolve into a more fully fledged example of a MultiBit style app. This keeps it obvious how much boilerplate type code is needed and what other features might be helpful. Currently it just shows transactions received with their confidences. Mike Hearn 2011-12-26 18:37:41 +00:00
  • 37ff135638 Add an accessor for network params to the wallet. Bugfix for TransactionConfidence (again) Mike Hearn 2011-12-26 16:10:29 +00:00
  • 6813ff4e69 Remove memory usage optimization that was complicating things. Mike Hearn 2011-12-24 19:30:55 +00:00
  • c0a295eed1 Rework how event listeners are called, so tx confidences are updated at the end of the receive process. Otherwise it's possible for the wallet to get confused because the state can change in the middle of processing. Document this and add a test. Update PingService. Also, change onCoinsReceived so it's only called once per transaction, to know when a tx appears in a block requires registration of a tx confidence listener. Mike Hearn 2011-12-24 18:42:14 +00:00
  • 9d5465390d Add event listeners to the TransactionConfidence object and a duplicate method. Mike Hearn 2011-12-21 15:56:58 +01:00
  • 49729fe0b0 Add a numConnectedPeers() accessor to PeerGroup. Mike Hearn 2011-12-21 15:55:02 +01:00
  • e2885e816e Minor typo fix. Mike Hearn 2011-12-21 15:54:44 +01:00
  • 9147c1bae5 Confidence levels now include double spending of transactions. Add a unit test to check the inbound finney attack case, in which a double spending block overrides a pending transaction. Mike Hearn 2011-12-20 00:56:24 +01:00
  • d39eb96ccc Put a bound on the size of the peer transaction pools. Mike Hearn 2011-12-19 23:54:18 +01:00
  • ca0407f91a Store a transaction in the Peer if we've seen it before. Mike Hearn 2011-12-19 23:37:36 +01:00
  • 5126745e01 Add a couple of methods to TransactionConfidence to get depth in chain measured in blocks and work done. Add example of usage to PingService. Still not quite there yet. Mike Hearn 2011-12-17 01:00:58 +01:00
  • 0a4dbb77cf First cut at transaction confidence levels. Expose a TransactionConfidence object that is updated by peers and wallets, which tracks how many peers have announced the transaction and the height of the transaction in the best chain (if any). Unit tests that check it does the right thing with re-orgs. Various small cleanups and simplifications in the tests. Mike Hearn 2011-12-16 18:13:55 +01:00
  • a5fc1c8cc5 Address more of Mirons review comments. Peers and PeerGroups now notify PeerEventListeners of broadcast transactions. Wallets provide an event listener object (note: they don't implement directly as most events are not of interest). Convenience APIs are provided to make linking it all together clearer. Mike Hearn 2011-12-15 15:43:32 +01:00
  • c9be40c9dc Address some review comments from Miron: - Remove safety check that could disguise bugs in future - Typo fix. Fix a bug that caused the tx.isPending() flag to be wrong inside callbacks, revealed by manual testing. Improved unit test realism to catch this case. Mike Hearn 2011-12-06 12:42:12 +01:00
  • 543542c551 Allow specification of the remote peer to connect to in PingService. Save the wallet after receiving a pending transaction. Mike Hearn 2011-12-06 12:40:40 +01:00
  • 7aa485110a First cut at a pending transactions patch. This isn't the final API, which will involve some changes to the wallet event listener/tx to have a concept of confidence levels. Mike Hearn 2011-11-29 15:11:15 +01:00
  • e6acc153ad Temporarily disable a couple of non-deterministic tests. Mike Hearn 2012-01-09 12:09:11 +01:00
  • 6fc9e758b7 Merge branch 'master' of https://code.google.com/p/bitcoinj Mike Hearn 2012-01-09 12:02:33 +01:00
  • 623389a156 Address comments from Miron and Andreas: - Make GetBlocksMessage/GetHeadersMessage implement toString/hashCode - Minor comment/naming fixes - > not >= for comparing fast catchup time to block header - Return current time in Wallet.getEarliestKeyCreationTime() rather than throw an exception when there are no keys in the wallet. Mike Hearn 2012-01-09 11:57:08 +01:00
  • 247a07a3ab Prepare Derby for merging Miron Cuperman 2012-01-05 15:58:35 -08:00
  • 826f2d2c51 Small cleanup and optimization for Derby store Miron Cuperman 2011-12-16 14:04:06 -08:00
  • cf824dfbce Make unit test genesis block pass verification Miron Cuperman 2011-12-16 14:01:56 -08:00
  • b7b1c039dc Cleanup and finish merge with 0.3 Miron Cuperman 2011-12-13 12:04:04 -08:00
  • f731c8591d Commit every 2 seconds instead of after every write Miron Cuperman (devrandom) 2011-05-16 18:40:58 +00:00
  • 075602aafd Apache Derby backed BlockStore, and a matching PingService Miron Cuperman 2011-12-13 10:56:52 -08:00
  • dd2be6eeb4 Make ECKey store its creation time. Implement fast catchup using the getheaders command. You can now set a date on a Peer/PeerGroup, before which block bodies will not be fetched. After that they will. Using the date of the earliest key in the wallet means new users can get started faster and with less battery drain as they aren't parsing blocks that are guaranteed to have no relevant transactions. Mike Hearn 2011-12-29 23:52:08 +00:00
  • da10e0ca69 Update TODO file. Mike Hearn 2011-12-29 20:27:45 +00:00
  • 1a107952b9 Reformatting of comments to 120 cols. Mike Hearn 2011-12-29 13:32:54 +00:00
  • 1b5252fd61 Fix a bug that could cause transactions to not move from the unspent to spent maps (efficiency issue but not a correctness issue). Add change outputs to the fake transactions created by TestUtils to reveal the issue and add more pool size tests. Resolves issue 89. Mike Hearn 2011-12-27 23:40:45 +00:00
  • 57d26107de Delete a fairly useless unit test that was also non-deterministic. Mike Hearn 2011-12-27 23:27:52 +00:00
  • 234090e5a6 Add numPeers() and getPeers() accessors to PeerGroup. Resolves issue 106. Mike Hearn 2011-12-27 12:04:49 +00:00
  • b9a141a96b Update DNS seeds list. Mike Hearn 2011-12-17 01:14:52 +01:00
  • 31d22fc0e7 Merge remote-tracking branch 'origin/master' Mike Hearn 2011-12-16 14:30:36 +01:00
  • 464b528175 Set length field to fix a unit test. Mike Hearn 2011-12-16 14:25:41 +01:00
  • 10c936c601 Support parsing and signature checking of alert messages. Very basic support, checking for version matches and relaying can come later. Mike Hearn 2011-12-16 14:25:41 +01:00
  • 3aafe80d99 Add a readByteArray() convenience method to Message, and simplify readVarInt. Mike Hearn 2011-12-16 14:25:17 +01:00
  • ea05f640ef Print the exception stack trace in BriefLogFormatter. Mike Hearn 2011-12-16 14:24:37 +01:00
  • a67909bebf Don't throw an exception when parsing an unknown message type. Mike Hearn 2011-12-16 14:24:03 +01:00
  • 7774bf4aa4 Remove an unnecessary import. Mike Hearn 2011-12-16 14:23:33 +01:00
  • 3d45b4b4a9 Fix HeadersMessage.parseLite . Miron Cuperman 2011-12-07 15:03:51 -08:00
  • 457ef5f318 Add HeadersMessage and parsing support for it. Patch from Roman Mandeleil. Mike Hearn 2011-12-05 18:35:10 +01:00
  • 525d5e8d55 Switch to JDK logging and add a simple formatter that is more concise than the default Java one. Mike Hearn 2011-11-25 16:56:35 +00:00
  • 74aae43f43 Switch to JDK logging and add a simple formatter that is more concise than the default Java one. Mike Hearn 2011-11-25 16:55:22 +00:00