Commit Graph

  • b64a3b5d1e Some work on DNS discovery - look up all seeds in parallel, pick 30 results, shuffle them and return. Allow users to specify a timeout. Return after the 30 results are found or we run out of time, whichever is first. Should smooth bumpy startup delays caused by occasional seed breakdowns. Mike Hearn 2012-12-07 17:06:53 +01:00
  • 68fa57c922 Fix unit test bug Mike Hearn 2012-12-07 16:59:49 +01:00
  • 2bcef988b4 Take out @author annotation from PeerGroup, as it's been worked on by lots of people by now. Mike Hearn 2012-12-07 15:41:58 +01:00
  • 26f63550be Implement calculation of a moving average of ping times. Improve PeerMonitor by making columns sortable. Mike Hearn 2012-12-07 14:45:41 +01:00
  • 3f89eda933 Fix some bugs that happen in chainless operation. Make Peer.getBestChainHeight() more accurate by taking into account blocks announced after a peer is connected, not just what it announced in the initial version message. Mike Hearn 2012-12-07 13:59:37 +01:00
  • 5cc9710e1f Have PeerGroup ping peers that support BIP 31 ping/pong responses, by default every 5 seconds. The last time ping is available in Peer.getLastPingTime(). This will shortly be used for ordering peers by responsiveness so we don't try and download from overloaded peers. Mike Hearn 2012-12-07 12:47:38 +01:00
  • f440913c1d Some improvements to the network code: - Delete the PeerGroupThread and replace it with a connectToAnyPeer() method. Getting connected to the network is now significantly faster as there is no sleep-wait loop between connections. - Delete the connectionTimeMillis param to the PeerGroup constructors. - Expose the PeerGroup c'tor that lets you specify the ClientBootstrap and expose a utility method to make one. This means users can now customize TCP options directly. - PeerGroup.setMaxConnections() now actually creates or tears down connections to meet the new required number, if the peer group is running. - Update the PeerMonitor so there's a spinner that lets you add or remove peers. Connecting and version handshaking is very fast now. - Misc changes and fixes. Mike Hearn 2012-12-06 15:06:37 +01:00
  • e20c35bf50 Fix FakeChannelSink so events are put into the queue in the right order (BEFORE running event handlers, not after). Mike Hearn 2012-12-06 15:01:40 +01:00
  • 7bfef81664 Reformat FakeChannel. Mike Hearn 2012-12-06 15:01:17 +01:00
  • 4989ecf15a Fix testnet3 NetworkParameters SubsidyDecreaseBlockCount Matt Corallo 2012-11-08 12:51:59 -05:00
  • fc573d5f1c Add a ping() method to the Peer class. It returns a future that can be used to find out when the pong returns and how slow it was. Temporarily, use this in the PeerMonitor example. Next up: moving pinging into the PeerGroup. Mike Hearn 2012-11-02 16:19:13 +01:00
  • 547bc29864 Add a PeerMonitor example. I'll extend it later. Mike Hearn 2012-11-02 15:25:59 +01:00
  • 8f52cabdf7 Allow blockChain to be skipped when creating PeerGroups/Peers. Mike Hearn 2012-11-02 15:24:39 +01:00
  • eb430dfc52 Take out dead tasks functionality from the peer group thread. Mike Hearn 2012-11-02 14:50:45 +01:00
  • c25dd9327a Make isAcked private. Minor reformatting. Mike Hearn 2012-11-02 14:50:30 +01:00
  • 7873254b2d Move BlockImporter from examples to tools. Mike Hearn 2012-11-01 16:48:24 +01:00
  • 6f036f9cf2 s/BitCoinJ/bitcoinj/ everywhere except the version handshake. Resolves issue 249. Mike Hearn 2012-11-01 16:24:09 +01:00
  • 9cc9607c73 ScriptException extends VerificationExtension, code cleanup follows Matt Corallo 2012-10-21 18:23:50 -04:00
  • 739b2c6183 Add constructor to H2FullPrunedBlockStore to specify cache size. Matt Corallo 2012-10-20 23:52:53 -04:00
  • a011948139 Avoid expensive calls to getClass().getSimpleName() in Message Matt Corallo 2012-10-20 23:21:53 -04:00
  • 9c124ac257 Close stream in BlockImporter Mike Hearn 2012-11-01 15:41:45 +01:00
  • a036b68aa2 Refactor some Stored* classes that are worthless... Matt Corallo 2012-10-18 18:57:12 -04:00
  • 91cd289a5c Make getMessageSize() public Matt Corallo 2012-10-18 18:55:04 -04:00
  • 49d26f6e28 Make genesis coinbase unspendable. Matt Corallo 2012-10-18 17:58:07 -04:00
  • 282b58c5ea Add a BlockImporter tool to examples. Matt Corallo 2012-08-12 02:44:08 +02:00
  • bf11bf08c3 Add data-driven Script tests from the reference client. Matt Corallo 2012-08-01 20:27:27 +02:00
  • 35ff3e1735 Add some comments to Script.java Mike Hearn 2012-11-01 15:18:49 +01:00
  • 050d70cf15 Validate P2SH in Script.correctlySpends Matt Corallo 2012-09-05 23:04:07 -04:00
  • 69f441b6c7 Make Script Verification multi-threaded in FullPrunedBlockChain. Matt Corallo 2012-08-06 03:47:38 +02:00
  • c4d0364a60 Update a couple of copyright notices that missed Matts name. Mike Hearn 2012-11-01 15:03:06 +01:00
  • 5321352820 Add TransactionOutPoint.setIndex Matt Corallo 2012-09-05 23:00:05 -04:00
  • da0f8a791b Re-throw wrapped ScriptException in FullPrunedBlockChain. Mike Hearn 2012-11-01 14:40:05 +01:00
  • cba837cfef Verify scripts in FullPrunedBlockChain.connectTransactions Matt Corallo 2012-07-28 02:01:45 +02:00
  • 8ec3cdeb9c Add a Script.correctlySpends for Script execution verification. Matt Corallo 2012-08-01 20:55:55 +02:00
  • 8d1591183f Rename TransactionInput get/setSequence -> get/setSequenceNumber. The previous name could be confusing and was inconsistent. Add lots of comments to Transaction.hashForSignature. Mike Hearn 2012-11-01 14:06:59 +01:00
  • 40237f0549 Implement all SigHash types in hashTransactionForSignature. Matt Corallo 2012-08-01 20:40:53 +02:00
  • 2f2850610e Add a Script.removeAllInstancesOf(script object) Matt Corallo 2012-08-01 20:55:15 +02:00
  • d7dc953da8 Add a startLocationInProgram field to ScriptChunk. Matt Corallo 2012-08-01 20:35:50 +02:00
  • 6a36dcd0ca Add hasKey method to Wallet. Also add addKeys method so keys can be added in bulk without triggering disk saves for each key. Resolves issue 255. Mike Hearn 2012-11-01 13:32:25 +01:00
  • 640db52cf4 Implement equals/hashCode on ECKey. Resolves issue 254. Mike Hearn 2012-11-01 12:05:30 +01:00
  • 45b89a1935 Use a generic block chain creator for Full Block Chain tests. Matt Corallo 2012-07-16 22:30:13 +02:00
  • 9585729398 Remove redundant TransactionOutput constructor Matt Corallo 2012-08-29 22:07:09 -04:00
  • f3d9c02841 Return false when calling Chain.add on an orphan we already have Matt Corallo 2012-08-29 22:05:03 -04:00
  • 599d4a671c Add a testnet-in-a-box mode. Matt Corallo 2012-07-14 18:49:46 +02:00
  • 2bfe8dfa25 Let calls to Block.addTransaction override sanity checks in testing Matt Corallo 2012-08-24 13:54:32 -04:00
  • dd47862829 Minor reformatting Mike Hearn 2012-10-23 20:35:55 +02:00
  • c5f8135f60 Allow coinbase value to be specified in createNextBlock for testing Matt Corallo 2012-07-14 03:45:45 +02:00
  • a1124e696b Verify MAX_BLOCK_SIZE in verifyTransactions(). Matt Corallo 2012-07-11 02:02:39 +02:00
  • 7eae91ea47 Remove temp announcement listener in PeerGroup.broadcastTransaction once done. Mike Hearn 2012-10-08 18:25:36 +02:00
  • 425126689e Move subsidy decrease block count constant to NetworkParameters. Matt Corallo 2012-07-14 03:16:03 +02:00
  • 7c636d7ecc Move block inflation calculator to be a static method of Block. In future this will move again to NetworkParameters. Mike Hearn 2012-10-08 18:03:50 +02:00
  • 90f5ab7e47 Check transaction fees and block subsidies in conenctTransactions. Matt Corallo 2012-07-14 01:00:48 +02:00
  • ef6e1b89ca Check depth of spent coinbases during connectTransactions. Matt Corallo 2012-07-16 03:19:01 +02:00
  • c789b757f3 Count P2SH SigOps the way the reference client does. Matt Corallo 2012-07-13 18:17:35 +02:00
  • 7ca87c078c Add block timestamp and transaction finalization checks. Matt Corallo 2012-07-26 14:32:22 +02:00
  • 5e0d4a168e Add a note that spending the genesis transaction should be impossible. Mike Hearn 2012-10-08 17:13:49 +02:00
  • fd941fe46a Don't recalculate fast catchup time to avoid hitting an assert. Mike Hearn 2012-10-08 17:13:37 +02:00
  • 6a96b0c392 Tweak ToyWallet to allow for easy switching to FullPrunedBlockChain Matt Corallo 2012-07-10 04:11:58 +02:00
  • 0cf2325640 Add a H2-backed FullPrunedBlockStore. Matt Corallo 2012-07-12 16:40:36 +02:00
  • 4018af8d51 Implement a Transaction.verify() to mimic Satoshi CheckTransaction Matt Corallo 2012-07-11 02:37:51 +02:00
  • 626ff2fa2c Verify SigOp counts when verifying Blocks. Matt Corallo 2012-07-11 01:18:15 +02:00
  • 1cbd5c07b4 Make a block with no txn a VerificationException, not Precondition Matt Corallo 2012-08-29 22:05:57 -04:00
  • dfebcc83ab Add a few test cases to test FullPrunedBlockChains. Matt Corallo 2012-07-10 04:27:14 +02:00
  • 0bdb9bc6f4 Add the option to use a valid input in createNextBlock. Matt Corallo 2012-07-09 01:46:50 +02:00
  • de2a6db666 Add a FullPrunedBlockChain class which can do full verification. Matt Corallo 2012-07-10 04:25:52 +02:00
  • 2a9c5b32d9 Add a checkpoint at height 200,000 Mike Hearn 2012-10-08 15:43:00 +02:00
  • c3ff3d112e Add checkpoint support and use it in AbstractBlockChain. Matt Corallo 2012-07-10 04:05:07 +02:00
  • 8edd6c5399 Add basic support for using AbstractBlockChains in Peer/PeerGroup. Matt Corallo 2012-07-10 01:25:23 +02:00
  • 03d8c71df3 Add a FullPrunedBlockStore interface and in-memory implementation. Matt Corallo 2012-07-09 04:08:13 +02:00
  • 548333bc6f Refactor BlockChain to make it more extensible. Matt Corallo 2012-07-08 05:16:16 +02:00
  • 74042b8ca3 Fix minor bug in PingService. Mike Hearn 2012-10-08 14:36:35 +02:00
  • b4215e8b01 Add a few Storage classes which avoid storing unnecessary data. Matt Corallo 2012-07-09 04:23:27 +02:00
  • 8a4c34edd0 Improvements to the toy wallet example. Now shows received transactions in a list. Uses auto save. Testnet3. Uses the new event to refresh the wallet tx list. Lets you copy the address to the clipboard with one click. Smaller and simpler than before! Mike Hearn 2012-10-04 00:05:34 +02:00
  • f2d9a6162d Fix a number of issues with message length caching. Matt Corallo 2012-08-13 23:30:01 +02:00
  • deb9da67aa Add a WalletEventListener.onWalletChanged() method that is designed for GUI apps to refresh their tx list. Resolves issue 222. Mike Hearn 2012-09-29 18:32:22 +02:00
  • 946d25548f Remove dead code that was used for appearsIn -> appearsInHashes migration, which pre-dates protobuf wallets. Make a few package-private members fully private. Mike Hearn 2012-09-29 16:37:04 +02:00
  • cca393eea5 Use a HashSet instead of a TreeSet. Resolves issue 250. Mike Hearn 2012-09-28 14:57:32 +02:00
  • 232d2cd51d testnet3 Simon Vermeersch 2012-09-22 17:27:46 +02:00
  • 78dedcc9ba Re-organize how transaction confidence listeners end up being called. Ensure WalletEventListener.onTransactionConfidenceChanged is always called for every building transaction after every block. Resolves issue 251. Mike Hearn 2012-09-27 18:43:31 +02:00
  • a9cdf99135 Fix comment example for buildMerkleTree Matt Corallo 2012-08-20 21:57:49 -04:00
  • 254393253c Version 0.7-SNAPSHOT Mike Hearn 2012-09-24 15:27:30 +02:00
  • 7b4dc184f7 Fix a bug that could cause us to fail the transition between downloading headers and blocks. Mike Hearn 2012-09-09 15:26:25 +02:00
  • 793254b6f5 Quieten some debug logs. Mike Hearn 2012-09-09 15:26:06 +02:00
  • 04772a7aa8 Allow setting the creation time for newly created keys (this is useful for testing) Mike Hearn 2012-09-09 15:25:58 +02:00
  • d3a540bb1e Fix a bug where we'd attempt to migrate depths of pending transactions. Mike Hearn 2012-09-09 14:45:34 +02:00
  • 7867841579 Fix an off by one error in tx depth migration. Mike Hearn 2012-09-08 23:28:26 +02:00
  • 087a4f2447 Close block store after finding height for wallet import. Mike Hearn 2012-09-07 15:11:32 +02:00
  • 8003266a66 Set the tx depth fields whilst loading 0.5 era wallets if the chain height is provided before load. This does NOT migrate workDone as that'd involve scanning potentially the entire block store and nobody uses this data much today. Resolves issue 240. Mike Hearn 2012-09-06 18:50:35 +02:00
  • 572f2a4f4e Implement the ability to explicitly set a fee in the Wallet.SendRequest. Does not yet auto-calculate the correct fees. Resolves issue 45. Resolves issue 245. Mike Hearn 2012-09-06 17:45:04 +02:00
  • 915a2adb10 Fix a NullPointerException introduced by the TCPNetworkConnection helper APIs. Mike Hearn 2012-09-06 17:25:43 +02:00
  • 48b4eb95a6 Update WalletTool to new send API. Mike Hearn 2012-09-06 15:05:20 +02:00
  • 29d5dcd424 Re-organize the wallet sending APIs to take a SendRequest. Full details of the API changes are sent to the list. Mike Hearn 2012-09-06 14:22:05 +02:00
  • 8162aa0ed1 Use current time as unit test chain genesis block time. Resolves a weird issue where the unit tests suddenly broke as the previous unit test genesis time was equal to testnet genesis time. Mike Hearn 2012-09-06 12:37:00 +02:00
  • 38aabdfa24 JavaDoc improvements and other minor tweaks. Remove a few things that are not really meant to be public APIs. Mike Hearn 2012-08-30 23:46:54 +02:00
  • 2961f65594 Use the new TCPNetworkConnection.connectTo API in PrintPeers, act as an example of the Guava futures API too. Mike Hearn 2012-08-30 23:16:37 +02:00
  • 8453654b85 Add a TODO in PeerGroup Mike Hearn 2012-08-30 23:16:15 +02:00
  • 26d55f889d Add a convenience API to TCPNetworkConnection to get a handshaked connection. Update JavaDocs. Mike Hearn 2012-08-30 23:16:05 +02:00
  • dee14b7109 Use JDK logging in the examples module. Mike Hearn 2012-08-30 23:14:00 +02:00
  • 5c8bfbda8b Delete a bit of dead code in PeerGroup. Mike Hearn 2012-08-30 15:49:52 +02:00
  • 0ae4c6e4d5 Mark JDK SLF adapter as scope test. Resolves issue 231. Mike Hearn 2012-08-28 19:19:30 +02:00