Commit Graph

344 Commits

Author SHA1 Message Date
Andreas Schildbach
840df06b79 RefreshWallet: Comment how to get a test wallet. 2016-03-30 13:11:44 +02:00
Andreas Schildbach
c1938fec75 Harmonize license headers. 2016-03-26 19:55:05 +01:00
Andreas Schildbach
a97f4923b4 Get rid of SendRequest.DEFAULT_FEE_PER_KB "constant".
If you have been reading that field, you probably want to use Transaction.REFERENCE_DEFAULT_MIN_TX_FEE.
If you have been writing to that field to change the SendRequest.feePerKb default, use a Context.feePerKb
instead. There is also a new Context.ensureMinRequiredFee.
2016-03-21 21:55:28 +01:00
Andreas Schildbach
c4ea9c95e5 Use Message.unsafeBitcoinSerialize() whenever it's very clear we won't modify the array. 2016-02-29 22:16:01 +01:00
Will Shackleton
7bb7ab60e1 Added capability to run example payment channels on regtest, test or main nets 2016-02-27 13:00:47 +01:00
Ross Nicoll
ea3713ec85 Split PeerConnectionEventListener
Split PeerConnectionEventListener into individual connect, disconnect
and discovery listeners.
Remove custom listener registration from Peer, as now it's possible to
register a connect listener only, without a disconnect listener.
2016-02-13 18:18:56 +00:00
Ross Nicoll
3d3dd6f721 Split peer event listeners into single method interfaces 2016-02-13 15:10:12 +01:00
Will Shackleton
8af0fa9884 Implemented version 2 of payment channels API
I implemented version 2 of the payment channels API using
OP_CHECKLOCKTIMEVERIFY-style payment channels.
2016-02-10 11:15:35 +01:00
Ross Nicoll
aca39ee9de Split wallet events into single method interfaces 2016-02-06 20:01:38 +01:00
Andreas Schildbach
59fa28ec70 LevelDbFullPrunedBlockStore: Reformat and rename class. It used Windows line endings. 2016-01-25 22:53:51 +01:00
Robin Owens
db74695e43 LevelDb fully pruned block store. 2016-01-16 12:11:01 +01:00
Kirill Vlasov
0ba3f4c2d2 "@Override" annotation should be used on any method overriding (since Java 5) or implementing (since Java 6) another one. 2015-12-08 10:29:40 +01:00
Ross Nicoll
92df23c979 Added LOW_S script flag test case generator 2015-10-31 16:10:40 +01:00
Mike Hearn
fabbb0a9ac Tweak HS integration again to avoid performance regression. 2015-10-08 15:56:44 +02:00
Andreas Schildbach
1be65483b4 Adds a services bitmask to PeerDiscovery.getPeers(), so we can query HTTP seeds for specific services.
As this is a breaking change to the API, it removes IrcDiscovery (there is no point in keeping it).
Also updates OkHttp to 2.4.0.
2015-08-25 12:44:35 +02:00
Ross Nicoll
ecbd021167 Refactor listener interfaces.
Refactor listener interfaces into their own package.
Split listener interfaces into smaller interfaces.
Make abstract implementations actually abstract.
Rearrange methods for adding listeners to put executor first.
2015-08-08 15:37:46 +02:00
Andreas Schildbach
16465d9310 Fix licenses for tools and examples. 2015-08-07 16:45:18 +02:00
Chris
0f0c7baec9 Update javascript Tor example to reflect simplified handling of .onion addresses 2015-07-24 23:03:21 +02:00
Andreas Schildbach
0441b38599 Provide a consistent fromBase58/toBase58 API for the VersionChecksummedBytes hierarchy.
Deprecates the old constructors and migrates bitcoinj itself to use the new API. Also makes DumpedPrivateKey use WrongNetworkException when appropriate. Adds missing testcases and corrects/adds a bit of JavaDoc.
2015-07-18 13:53:59 +02:00
Andreas Schildbach
24de5e2a40 0.14-SNAPSHOT 2015-07-06 09:54:04 +02:00
Amichai Rothman
dc94018992 Fix misc. formatting/style/syntax inconsistencies and issues. 2015-06-30 12:45:59 +02:00
Amichai Rothman
820765753c Clean up toString and other string-related code. 2015-06-30 12:45:59 +02:00
Mike Hearn
9f8501a7bf Examples: add a tor.js file that connects to a hidden service node, as a demo of how to do it. 2015-06-25 19:04:54 +02:00
Mike Hearn
7666d84625 Examples: demo.js to use current PeerGroup start() API 2015-06-25 19:02:31 +02:00
Michael Bell
caa294c7f6 Fixing NPE in ExamplePaymentChannelServer due to using unintialized state. 2015-06-24 15:29:28 +02:00
Amichai Rothman
faf92971dd Refactored Sha256Hash API:
- depracated constructors
- wrap methods to wrap given hash values in a new instance
- of/twiceOf methods to calculate hash values in a new instance
- hash/hashTwice to calculate hash values and return the raw bytes
2015-06-24 15:21:14 +02:00
Peter Stockli
e25e561560 remove unused imports and unused local variables 2015-06-23 19:51:41 +02:00
Andreas Schildbach
dba18dfb4d Update to slf4j 1.7.7. 2015-04-17 16:37:13 +02:00
Mike Hearn
b25899de58 Rename DownloadListener to DownloadProgressTracker 2014-12-18 13:59:50 +01:00
Mike Hearn
8acf2e91e8 Add a BIP70 example to the javascript folder 2014-12-04 18:51:45 +01:00
Mike Hearn
90dace2ef5 Java 8 syntax cleanup 2014-12-03 13:10:07 +01:00
Devrandom
b9bca58f26 Remove tx from TransactionConfidence 2014-12-03 13:10:06 +01:00
Mike Hearn
e7c00df740 Replace peerGroup.startAsync/awaitRunning with start() and awaitTerminated with stop(). 2014-11-24 13:04:58 +01:00
Mike Hearn
0952cf3d20 RefreshWallet doesn't need to specify localhost explicitly anymore. 2014-11-23 14:23:35 +01:00
Richard Green
3a23bb5ecd Update forwarding.py
removed commented code that served no purpose.
2014-11-03 14:11:16 +01:00
Richard 'ragmondo' Green
17d8ac8d74 Made the sys.path.append more obvious 2014-11-03 14:11:16 +01:00
Richard 'ragmondo' Green
7169643d1c Renamed params variable to use correct source library; removed traceback usage to be compatible with jython 2.5 2014-11-03 14:11:16 +01:00
Alon Muroch
6e40d4d7cd Delete watched scripts methods. Fixed queueOnScriptsChanged threading. 2014-10-31 11:07:59 +01:00
ollekullberg
f40785fbdf ExamplePaymentChannelClient should not send PeerGroup to the extension, since it uses WalletAppKit. 2014-10-17 11:17:11 +02:00
Mike Hearn
9dcc4ed6f4 0.13-SNAPSHOT 2014-10-05 20:38:00 +02:00
Mike Hearn
83a9a71f3f bitcoinj 0.12 2014-10-03 00:46:31 +02:00
Mike Hearn
953625de9b Add a couple of JavaScript examples. 2014-10-02 16:19:44 +02:00
Mike Hearn
0a6f901b23 Renamespace to org.bitcoinj away from com.google.bitcoin, as bitcoinj is no longer a Google project and being namespaced under com.google causes issues with Sonatype/Maven Central.
To fixinate your code:

find . -name '*.java' | xargs sed -i .bak 's/import com.google.bitcoin./import org.bitcoinj./g;s/import static com.google.bitcoin./import static org.bitcoinj./g'
2014-09-30 17:05:07 +02:00
Mike Hearn
8240f0c312 Add a Python/Jython version of the getting started tutorial, thanks to Richard Green. 2014-09-30 15:38:44 +02:00
Martin Zachrison
036f0bec27 Make PaymentChannel.ServerConnection.paymentIncrease asynchronous. 2014-09-30 14:34:54 +02:00
Devrandom
03bacf4fa9 Cache deterministic seed 2014-09-22 15:00:18 +02:00
Michael Bumann
cfd795ccbd Adding more examples.
This adds example usages of:
* using the WalletAppKit
* restoring a wallet from a seed
* sending coins
* implementing a WalletEventListener
2014-09-22 12:12:14 +02:00
ollekullberg
fe91dc9110 Payment channel extension should be able to be initialized in two steps:
* A constructor that only takes the wallet as an argument

* A setTransactionBroadcaster() which should be called when the Bitcoin network is ready

Motivation: Some wallets (MultiBitHD) does not use WalletAppKit, and starts with reading the wallet before initializing the bitcoin network.
Now these wallets can create the wallet (and the wallet file is read), and call the setter after the bitcoin network is up.
2014-08-11 18:43:18 +02:00
cyberzac
eff9ac2ecc Support for bundling an optional info Protobuf ByteString with a PaymentAck message 2014-08-03 21:02:40 +02:00
cyberzac
1153192be8 Support for bundling an optional info Protobuf ByteString with an UpdatePayment message. 2014-07-31 16:01:38 +02:00
Andreas Schildbach
afcc7e3f13 Coin.toFriendlyFormat() includes denomination (BTC). This saves a lot of string concatenation code. 2014-07-05 21:03:51 +02:00
Mike Hearn
60e70bd79e Fix to the PrivateKeys example. Thanks to recallfx for the patch. 2014-06-02 21:49:59 +08:00
Andreas Schildbach
d4c1a1b043 Add missing @Override annotations. 2014-05-30 15:33:58 +02:00
Andreas Schildbach
51c48bb69f Clean up coin constants and make more use of it. 2014-05-30 15:09:33 +02:00
Andreas Schildbach
48a76a8a03 Clean up Coin API for multiplications and divisions. 2014-05-30 15:09:32 +02:00
Andreas Schildbach
eb81b0c815 Move coin related methods and constants from Utils into Coin. 2014-05-30 15:09:32 +02:00
Andreas Schildbach
022e7c27fe Wrap coin-ish BigIntegers into Coin class. 2014-05-30 15:09:32 +02:00
Mike Hearn
5638387d3a HD wallets alpha preview 2014-05-29 20:11:13 +02:00
Mike Hearn
8ff52f5217 Payment channels: update example client to reflect API changes. 2014-05-28 13:26:19 +02:00
Piotr WÅ‚odarek
c08c68fc5e Dealt with several compiler notices by verifying and then fixing or suppressing. Reduces compilation output noise. 2014-05-25 11:43:36 +02:00
Mike Hearn
0942bb57b5 Add a double spending test program 2014-04-15 13:35:11 +02:00
Andreas Schildbach
6087e43377 Upgrade to Guava 16.0.1.
Resolves issue 375.
2014-04-08 16:49:09 +02:00
Mike Hearn
829656b153 Correct maven instruction in the README file and make ForwardingService work on mainnet again by fixing command line arg parsing.
Resolves issue 523.
2014-03-10 17:36:32 +01:00
Andreas Schildbach
8fdfb04e43 Update SLF4J to version 1.7.6. Previously, inconsistent versions were used between sub-projects. All unit-tests pass. 2014-03-07 17:47:42 +01:00
Mike Hearn
5b74ea5c7b Switch to version 0.12-SNAPSHOT. To the moon! ;) 2014-02-04 11:31:42 +01:00
Devrandom
3d99be48bc Priority queue and exponential backoff for PeerGroup
Connect to peers in a service loop thread.

Resolves issue #159
Resolves issue #503
2013-12-23 22:57:19 +00:00
Mike Hearn
ce4ac86884 Move discovery package into net package. 2013-12-10 13:13:52 -08:00
Mike Hearn
3318d15194 Rename networkabstraction package to just net 2013-12-10 13:12:22 -08:00
Matt Corallo
534cec9791 Rewrite the network stack.
Remove Netty entirely, using the new Nio wrapper classes instead

* BitcoinSerializer now uses ByteBuffers directly instead of
  InputStreams.
* TCPNetworkConnection and NetworkConnection interface deleted,
  Peer now extends the abstract class PeerSocketHandler which
  handles deserialization and interfaces with the Nio wrapper
  classes.
* As a part of this, all version message handling has been moved
  to Peer, instead of doing it in TCPNetworkConnection.
* Peer.setMinProtocolVersion() now returns a boolean instead of a
  null/non-null future which holds the now-closing channel.
* Peer.sendMessage (now PeerSocketHandler.sendMessage()) now
  returns void.
* PeerGroup has some significant API changes:
  * removed constructors which take pipeline factories,
    makePipelineFactory, createClientBootstrap
  * Replaced with a setSocketTimeoutMillis method that sets a
    timeout between openConnection() and version/verack exchange.
    (Note that because Peer extends AbstractTimeoutHandler, it has
    useful timeout setters public already).
  * connectTo returns a Peer future, not a ChannelFuture
  * removed peerFromChannelFuture and peerFromChannel
* Peer and PeerGroup Tests have semi-significant rewrites:
  * They use actual TCP connections to localhost
  * The "remote" side is a InboundMessageQueuer, which queues
    inbound messages and allows for writing arbitrary messages.
  * It ignores certain special pings which come from pingAndWait,
    which is used to wait for message processing in the Peer.
  * Removed a broken test in PeerGroupTest that should be reenabled
    if we ever prefer a different version than our minimum version
    again.
  * Removed two duplicate tests in PeerTest (testRun_*Exception)
    which are tested for in badMessage as well.
  * Added a test for peer timeout and large message deserialization

Author:    Matt Corallo <git@bluematt.me>
2013-12-10 13:03:14 -08:00
Mike Hearn
70cd2ffb96 Wallet: throw exceptions when completing a transaction fails.
If there's insufficient balance (typical error) then InsufficientMoneyException is thrown (checked).
If the SendRequest is bad in some way, like asking to create a spend that would violate the protocol rules, IllegalArgumentException is thrown (unchecked).

Also make VerificationException (and thus ProtocolException+ScriptException) unchecked.

Resolves issue 425.
2013-11-27 15:25:52 +01:00
Mike Hearn
0bc28781ae Payment channels: rename "close" to "settle".
The previous overloading of the term "close" to mean both settlement of the channel (broadcast of the final payment tx) and terminating/cleaning up the underlying network connection was very confusing and made the code harder to work with. The notion of "closing" a protocol that is often embedded inside others isn't really well defined, so there's perhaps more work to do here, but this change makes the code easier to follow and is basically a big pile of no-ops.
2013-11-12 13:37:46 +01:00
Mike Hearn
533e2f21b7 Delete ToyWallet example. It's redundant with the wallettemplate app now. 2013-10-27 17:15:42 +01:00
Mike Hearn
95f528a340 Add more features to WalletAppKit, and ensure wallets it creates always have at least one key. 2013-09-15 20:24:52 +02:00
Mike Hearn
9bd52196ed Payment channels: Shrink the payment channel server example min required value to make it more micropaymenty. 2013-09-04 13:27:10 +02:00
Mike Hearn
b20f0c306c Remove verifier from examples/pom.xml, it requires us to wait for reproducible build support to land. 2013-08-11 16:47:26 +02:00
Mike Hearn
08afe9044d Move verifier XML around. 2013-08-11 16:45:07 +02:00
Mike Hearn
2808b062d7 Version 0.11-SNAPSHOT 2013-07-30 14:47:39 +02:00
Mike Hearn
435d4e85b0 Update copyright year on ForwardingService. 2013-07-29 18:35:26 +02:00
Mike Hearn
9adb275e6d Rename and rewrite PingService. It
It's now just ForwardingService, doesn't use the "from address" concept anymore, and uses WalletAppKit + balance futures. The new code is much simpler and easier to read.
2013-07-29 17:19:28 +02:00
Mike Hearn
ce1d8315ea Payment channels: tweaks to the examples.
Print wallet state at various points. Demonstrate disconnecting vs closing channels.
2013-07-25 15:32:17 +02:00
Mike Hearn
dcf04f6cb6 Payment channels: inline a superfluous misnamed method on StoredServerChannel and rename getState to getOrCreateState. 2013-07-19 15:55:30 +02:00
Mike Hearn
4f9bc98e97 Payment channels: Re-order c'tor of StoredPaymentChannelClientStates.
This makes it consistent with the server side and put the listener last. It's easier to read this way when an anonymous inner class is used.
2013-07-19 15:55:30 +02:00
Mike Hearn
99f32b16af Introduce UnreadableWalletException and make WalletProtobufSerializer throw it in all cases where there's a problem reading the wallet. Resolves issue 415. Resolves issue 416. 2013-07-11 16:04:00 +02:00
Mike Hearn
f473267da2 Exception handling: provide a global variable in Threading that receives all unhandled exceptions from all framework threads.
Replaces the now removed PeerEventListener.onException() callback.
2013-07-09 14:47:38 +02:00
Mike Hearn
6b7d653614 Major rework of how confidence listeners are called:
* API change: TransactionConfidence.Listener now takes a reason enum describing the general class of change.
* Confidence listeners are now invoked in the user code thread as well, thus eliminating any chance of unexpected re-entrancy.
* The wallet batches up confidence changes and executes them all at the end of major operations, avoiding confusing intermediate transitions that could occur in the previous design.
* Much code has been simplified as a result and it's now harder to screw up.
2013-07-05 10:54:19 +02:00
Matt Corallo
4908c241f7 Implement server-side and client-side payment channel protocols.
This implements micropayment payment channels in several parts:
 * Adds PaymentChannel[Server|Client]State state machines which
   handle initialization of the payment channel, keep track of
   basic in-memory state, and check data received from the other
   side, based on Mike Hearn's initial implementation.
 * StoredPaymentChannel[Client|Server]States manage channel
   timeout+broadcasting of relevant transactions at that time,
   keeping track of state objects which allow for channel
   resume, and are saved/loaded as a WalletExtension.
 * Adds PaymentChannel[Client|Server] which manage a connection
   by getting new protobufs, generating protobufs for the other
   side, properly stepping the associated State object and
   ensuring the StoredStates object is properly used to save
   state in the wallet.
 * Adds PaymentChannel[ClientConnection|ServerListener] which
   create TCP sockets to each other and use
   PaymentChannel[Client|Server] objects to create/use payment
   channels.

The algorithm implemented is the one described at
https://en.bitcoin.it/wiki/Contracts#Example_7:_Rapidly-adjusted_.28micro.29payments_to_a_pre-determined_party
with a slight tweak to use looser SIGHASH flags so that the
Wallet.completeTx code can work its magic by adding more inputs if
it saves on fees.

Thanks to Mike Hearn for the initial state machine implementations
and all his contracts work and Jeremy Spilman for suggesting the
protocol modification that works with non-standard nLockTime
Transactions.
2013-06-27 14:15:49 +02:00
Mike Hearn
8b8bf50144 Version 0.10-SNAPSHOT 2013-06-18 16:33:06 +02:00
Mike Hearn
332967f0bd PingService: allow usage of regtest mode, always include a fee in the bounce transaction, don't use from addresses anymore. 2013-06-17 14:57:02 +02:00
Mike Hearn
f4c3b6a49d Global search and replace to use the param-class specific instance getters and prodNet -> MainNetParams.
The old "prodnet" name could be confusing to non-native speakers or people who just haven't been exposed to Google lingo. Main net is more idiomatic.

Conflicts:
	tools/src/main/java/com/google/bitcoin/tools/BlockImporter.java
2013-06-05 14:10:40 +02:00
Mike Hearn
8043bc335b NetworkParameters: hide port behind a getter. 2013-06-05 14:10:38 +02:00
Mike Hearn
f88bdc5fe3 Wallet: make keychain private and add a remove method. 2013-04-22 13:45:38 +02:00
Mike Hearn
f1845dd552 Version 0.9-SNAPSHOT 2013-04-11 14:27:35 +02:00
Mike Hearn
9449897e2d Fix PingService re-entrancy. 2013-04-09 15:16:04 +02:00
Mike Hearn
3d6691c82a Switch to using DNS for testnet discovery, as LFnet has gone away.
Put DNS seeds into NetworkParams.
Deprecate IrcDiscovery and remove the unit tests for it.
Update examples and tools to use DNS for everything.
Resolves issue 299.
2013-03-29 17:39:24 +00:00
Mike Hearn
57b3fb4368 Bump language level to java 6 in the pom and fix the ToyWallet demo. 2013-03-19 15:40:52 +01:00
Mike Hearn
5d0518dafd Merge encrypted wallets functionality by Jim Burton. 2013-03-18 18:27:12 +01:00
Mike Hearn
c8c1e68152 Unlock TransactionConfidence event listeners, make sure MemoryPool is not locked when a tx is marked broadcast by a peer to avoid inversions via listeners.
Unfortunately this introduces some new FindBugs warnings because it doesn't understand the inside-out locking pattern used here, despite that it's correct.
Update issue 233.
2013-03-07 17:38:13 +01:00
Mike Hearn
0534231de9 Run wallet event listeners unlocked. Resolves another inversion.
Update issue 223.
2013-03-07 17:08:15 +01:00
Mike Hearn
97bce595c3 ToyWallet -> SPVBlockStore. 2013-03-06 13:47:51 +01:00
Mike Hearn
96cd35f139 Add a convenience method to CheckpointManager and example of how to use in PingService. 2013-03-05 14:48:28 +01:00
Mike Hearn
121695fa13 Use a shutdown hook to make sure everything is wrapped up nice and neat. It's not actually required in this example, but it's good practice. 2013-03-05 14:48:28 +01:00
Mike Hearn
20fdc72ab2 Make PingService use SPVBlockStore. 2013-03-05 14:48:28 +01:00
Mike Hearn
a700b97f75 Delete the Derby block store. It isn't that useful now we have full verification based on H2. 2013-02-25 21:43:43 +01:00
Mike Hearn
72d6f23e92 Version 0.8-SNAPSHOT 2013-02-19 16:11:22 +01:00
Mike Hearn
3b7a494a37 Show reverse DNS for nodes in PeerMonitor. 2013-02-15 16:10:26 +01:00
Mike Hearn
53f526cef0 Refresh PingService example for 0.7 2013-02-05 21:35:04 +01:00
Mike Hearn
f488c29c12 Fix some races in PeerMonitor. 2013-02-05 15:14:34 +01:00
Mike Hearn
b7b52c3fc9 Add support for recursively downloading mempool dependencies of a given mempool transaction.
This isn't currently used anywhere, but can be used as the first step of doing some basic risk analysis of unconfirmed transactions.
2013-01-28 16:32:31 +01:00
Mike Hearn
6504296b79 Avoid confusing bugs by switching NetworkParameters.testNet() to be testnet3 not testnet2. 2013-01-16 18:15:46 +01:00
Mike Hearn
707e3a0989 Simplify FetchBlock by updating it to the latest APIs. 2013-01-16 17:55:46 +01:00
Mike Hearn
1454261ff3 Use the testnet3 channel in PrintPeers. 2013-01-11 22:14:12 +01:00
Mike Hearn
3197be51ea Minor simplifications. 2012-12-25 01:23:16 +00:00
Mike Hearn
22ff79dd8a Re-evaluate download peer when a new peer connects. Add unit tests for selecting the best peer. 2012-12-24 23:48:48 +00:00
Mike Hearn
b71015a297 Convert table co-ordinates correctly in PeerMonitor. 2012-12-24 22:53:17 +00:00
Mike Hearn
07011be796 Introduce a PeerGroup method for calculating the most common chain height.
Use it to make peer selection a little smarter.
Render pending peers and peers that are reporting un-common chain heights in PeerMonitor.
2012-12-24 22:32:16 +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
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