Mike Hearn
9639b45ad8
BitCoin -> Bitcoin
2012-12-24 16:11:11 +00:00
Mike Hearn
93893e10ad
Make PeerGroup use the Guava services framework. Makes start/stop optionally non-blocking. Resolves issue 258.
2012-12-21 23:03:15 +01:00
Mike Hearn
826aafd3e0
Make H2 non required.
2012-12-16 13:38:46 +01:00
Mike Hearn
eacda0bdfc
Decouple the wallet from the block chain by introducing a BlockChainListener interface, and making the Wallet implement it. Resolves issue 94.
2012-12-14 17:04:30 +01:00
Mike Hearn
5abd546eb2
Update the AbstractBlockChain javadoc.
2012-12-14 16:33:37 +01:00
Mike Hearn
f6a498c241
Remove the redundant Wallet.isTransactionRelevant(..., includeDoubleSpending) parameter, as it was always set to true.
2012-12-14 16:24:24 +01:00
Mike Hearn
ca629e330f
Duplicate a transaction before sending to wallets beyond the first. Resolves issue 257.
2012-12-14 15:24:22 +01:00
Mike Hearn
1710be5b06
Fix typo in PeerGroup c'tor javadoc. Spotted by Matt.
2012-12-12 22:23:55 +01:00
Mike Hearn
590fd82fdc
Fix a regression introduced by the block height accessor changes that prevented DownloadListener from triggering. Fix more inconsistent locking issues.
2012-12-11 00:22:25 +01:00
Mike Hearn
372a23fbfe
Fix more inconsistent synchronization bugs.
2012-12-11 00:08:46 +01:00
Mike Hearn
93fd045488
Lock the ping time accessors correctly.
2012-12-10 23:50:21 +01:00
Mike Hearn
df1ba42100
Fix OP_PUSHDATA decoding by preventing sign-extension. Clears some FindBugs warnings.
2012-12-10 23:44:14 +01:00
Mike Hearn
5668e1457e
Fix a bogus format string.
2012-12-10 23:43:46 +01:00
Mike Hearn
16668390b3
Support full verification in wallet tool.
2012-12-10 23:30:22 +01:00
Mike Hearn
917e4460f0
Tabs to spaces.
2012-12-10 13:32:11 +01:00
Mike Hearn
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.
2012-12-07 17:06:53 +01:00
Mike Hearn
68fa57c922
Fix unit test bug
2012-12-07 16:59:49 +01:00
Mike Hearn
2bcef988b4
Take out @author annotation from PeerGroup, as it's been worked on by lots of people by now.
2012-12-07 15:41:58 +01:00
Mike Hearn
26f63550be
Implement calculation of a moving average of ping times. Improve PeerMonitor by making columns sortable.
2012-12-07 14:45:41 +01:00
Mike Hearn
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.
2012-12-07 13:59:37 +01:00
Mike Hearn
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.
2012-12-07 12:47:38 +01:00
Mike Hearn
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.
2012-12-06 15:06:37 +01:00
Mike Hearn
e20c35bf50
Fix FakeChannelSink so events are put into the queue in the right order (BEFORE running event handlers, not after).
2012-12-06 15:01:40 +01:00
Mike Hearn
7bfef81664
Reformat FakeChannel.
2012-12-06 15:01:17 +01:00
Matt Corallo
4989ecf15a
Fix testnet3 NetworkParameters SubsidyDecreaseBlockCount
2012-11-29 17:36:55 +01:00
Mike Hearn
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.
2012-11-02 16:19:13 +01:00
Mike Hearn
547bc29864
Add a PeerMonitor example. I'll extend it later.
2012-11-02 15:25:59 +01:00
Mike Hearn
8f52cabdf7
Allow blockChain to be skipped when creating PeerGroups/Peers.
2012-11-02 15:24:39 +01:00
Mike Hearn
eb430dfc52
Take out dead tasks functionality from the peer group thread.
2012-11-02 14:50:45 +01:00
Mike Hearn
c25dd9327a
Make isAcked private. Minor reformatting.
2012-11-02 14:50:30 +01:00
Mike Hearn
7873254b2d
Move BlockImporter from examples to tools.
2012-11-01 16:48:24 +01:00
Mike Hearn
6f036f9cf2
s/BitCoinJ/bitcoinj/ everywhere except the version handshake.
...
Resolves issue 249.
2012-11-01 16:24:26 +01:00
Matt Corallo
9cc9607c73
ScriptException extends VerificationExtension, code cleanup follows
...
Just cleans up code now that ScriptException extends
VerificationExtension.
2012-11-01 16:08:56 +01:00
Matt Corallo
739b2c6183
Add constructor to H2FullPrunedBlockStore to specify cache size.
2012-11-01 15:43:09 +01:00
Matt Corallo
a011948139
Avoid expensive calls to getClass().getSimpleName() in Message
2012-11-01 15:42:51 +01:00
Mike Hearn
9c124ac257
Close stream in BlockImporter
2012-11-01 15:41:52 +01:00
Matt Corallo
a036b68aa2
Refactor some Stored* classes that are worthless...
...
Specifically, this moves StoredTransaction to
MemoryFullPrunedBlockStore and uses custom serialization for
StoredTransactionOutput.
2012-11-01 15:41:52 +01:00
Matt Corallo
91cd289a5c
Make getMessageSize() public
2012-11-01 15:33:57 +01:00
Matt Corallo
49d26f6e28
Make genesis coinbase unspendable.
2012-11-01 15:33:46 +01:00
Matt Corallo
282b58c5ea
Add a BlockImporter tool to examples.
2012-11-01 15:29:15 +01:00
Matt Corallo
bf11bf08c3
Add data-driven Script tests from the reference client.
2012-11-01 15:21:06 +01:00
Mike Hearn
35ff3e1735
Add some comments to Script.java
2012-11-01 15:18:49 +01:00
Matt Corallo
050d70cf15
Validate P2SH in Script.correctlySpends
2012-11-01 15:07:17 +01:00
Matt Corallo
69f441b6c7
Make Script Verification multi-threaded in FullPrunedBlockChain.
2012-11-01 15:05:51 +01:00
Mike Hearn
c4d0364a60
Update a couple of copyright notices that missed Matts name.
2012-11-01 15:03:06 +01:00
Matt Corallo
5321352820
Add TransactionOutPoint.setIndex
2012-11-01 14:40:09 +01:00
Mike Hearn
da0f8a791b
Re-throw wrapped ScriptException in FullPrunedBlockChain.
2012-11-01 14:40:05 +01:00
Matt Corallo
cba837cfef
Verify scripts in FullPrunedBlockChain.connectTransactions
2012-11-01 14:37:53 +01:00
Matt Corallo
8ec3cdeb9c
Add a Script.correctlySpends for Script execution verification.
2012-11-01 14:36:20 +01:00
Mike Hearn
8d1591183f
Rename TransactionInput get/setSequence -> get/setSequenceNumber. The previous name could be confusing and was inconsistent. Add lots of comments to Transaction.hashForSignature.
2012-11-01 14:06:59 +01:00