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
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
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
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
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
7873254b2d
Move BlockImporter from examples to tools.
2012-11-01 16:48:24 +01:00
Mike Hearn
9c124ac257
Close stream in BlockImporter
2012-11-01 15:41:52 +01:00
Matt Corallo
282b58c5ea
Add a BlockImporter tool to examples.
2012-11-01 15:29:15 +01:00
Matt Corallo
6a96b0c392
Tweak ToyWallet to allow for easy switching to FullPrunedBlockChain
2012-10-08 17:12:41 +02:00
Mike Hearn
74042b8ca3
Fix minor bug in PingService.
2012-10-08 14:36:35 +02:00
Mike Hearn
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!
2012-10-04 00:24:51 +02:00
Mike Hearn
254393253c
Version 0.7-SNAPSHOT
2012-09-24 15:27:30 +02:00
Mike Hearn
2961f65594
Use the new TCPNetworkConnection.connectTo API in PrintPeers, act as an example of the Guava futures API too.
2012-08-30 23:16:37 +02:00
Mike Hearn
dee14b7109
Use JDK logging in the examples module.
2012-08-30 23:14:00 +02:00
Mike Hearn
fd9eba1697
Change PeerGroup.broadcastTransaction() to wait for propagation.
...
It means a send won't be considered completed until it's accepted by the net.
Also is for the case where you receive a transaction (eg, via Bluetooth) and
you want to broadcast it such that you can know it's valid.
Make WalletTool use --peers instead of --peer, a comma separated list of
addresses to use. Remove the crappy sleep after send now we can wait.
Resolves issue 167.
2012-07-22 01:20:48 +02:00
Mike Hearn
567fccbf8a
Fix indentation in core/pom, clear a couple of findbugs warnings that were introduced with the last commit.
2012-07-04 17:58:35 +02:00
Miron Cuperman
fa10523007
Netty network stack.
...
This should resolve some scalability and robustness issues.
2012-07-04 17:08:35 +02:00
Mike Hearn
893013b415
Remove a couple of redundant Maven <version> tags.
2012-06-08 17:21:38 +02:00
Jim Burton
80f141cbf5
TransactionConfidence changes (coinbase phase 2) + Mike's feedback
2012-06-01 16:14:18 +02:00
Mike Hearn
7705bd59a4
Version 0.6-SNAPSHOT
2012-05-21 16:46:44 +02:00
Mike Hearn
08f5630cf9
Update ToyWallet to spongycastle.
2012-05-18 17:22:47 +02:00
Mike Hearn
eb490f7168
Stop the main thread as the peer group thread is now daemonized.
2012-04-04 17:38:05 +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
Mike Hearn
a119286b29
POM changes and refactorings from Gary.
2012-03-16 13:20:50 +01:00
Mike Hearn
6e162057c1
Removed IML files from git.
2012-03-13 19:00:33 +01:00
Mike Hearn
0e52c98c45
Use the standard Maven directory layout, rename "lib" to "core". Mavenize submodules.
2012-03-13 18:57:03 +01:00
Mike Hearn
216deb2d35
Re-organize the source tree so people can depend on bitcoinj without pulling in the examples, tools, or dependencies thereof.
2012-03-11 20:01:12 +01:00