Commit Graph

309 Commits

Author SHA1 Message Date
Sean Gilligan
a2cf303655 build.gradle: require JDK 11 for the build
Uses javac -release option to validate API for older JDK.
2021-12-24 11:35:37 +01:00
Andreas Schildbach
0b5d40e49f Remove references to a specific testnet faucet. 2021-10-22 09:08:21 +02:00
Sean Gilligan
6da10f8641 build.gradle: Update SLF4J to 1.7.32. 2021-09-17 11:51:11 +02:00
Andreas Schildbach
e407240b7e Support BIP133 feefilter messages. 2021-05-03 16:23:51 +02:00
Andreas Schildbach
1db44fb4f1 PeerMonitor: Show an additional column with the results of an getaddr request. 2021-04-22 16:50:07 +02:00
Andreas Schildbach
04a71b09af PeerMonitor: Increase initial size of window. 2021-04-22 16:02:19 +02:00
Andreas Schildbach
39bb7faafb PeerMonitor: Simplify a switch-case. 2021-04-22 15:59:09 +02:00
Andreas Schildbach
ffb02ae760 Script: Deprecate non-segwit variant of correctlySpends(). 2021-03-07 09:43:55 +01:00
Andreas Schildbach
8906e7cc27 Transaction: Add toHexString() for converting a transaction to raw hex format. 2021-02-16 11:26:09 +01:00
Andreas Schildbach
4c094ef193 WalletTool, BuildCheckpoints, FetchBlock: Migrate parsing of command line options from JOpt to picocli. 2021-02-11 16:15:16 +01:00
Andreas Schildbach
f0bbb92bcf ForwardingService: Get rid of unused forwardCoins() method argument. 2020-10-24 16:45:04 +02:00
Andreas Schildbach
b6b221ae1b Apply "Anonymous type has shorter lambda alternative" refactoring. 2020-09-07 21:13:14 +02:00
Andreas Schildbach
c08a4d97d3 Apply "Anonymous type can be replaced with lambda" refactoring. 2020-09-07 21:13:14 +02:00
Andreas Schildbach
4847a9df27 Apply "Explicit generic type can be replaced with <>" refactoring. 2020-09-07 21:10:44 +02:00
Andreas Schildbach
7d9f109ee1 Peer: Deprecate a redundant constructor. 2020-03-04 17:34:11 +01:00
Andreas Schildbach
06bd0a841e PeerDiscovery: Change getPeers() return type from array to list.
This gets rid of a lot of array/list conversions.
2020-03-04 12:35:02 +01:00
Sean Gilligan
e4c6b98536 Make Guava an api dependency using java-library
Use the Gradle java-library plugin to make Guava an `api`
dependency since Guava types are used in the bitcoinj public API.

This allows us to remove explicit dependencies on
Guava in the other modules.
2020-02-29 15:28:09 -08:00
Andreas Schildbach
0112e3ccbe Update slf4j to 1.7.30. 2020-01-23 01:16:58 +01:00
Andreas Schildbach
68538e57af Update Guava to 28.2-android. 2020-01-23 01:09:35 +01:00
Andreas Schildbach
ded215e69e Update slf4j to 1.7.29. 2019-11-21 12:35:13 +01:00
Andreas Schildbach
f396327246 Update Guava to 28.1-android. 2019-10-21 12:15:53 +02:00
Sean Gilligan
03d7d7369f Update slf4j to 1.7.28.
1.7.28 fixes an error in 1.7.27 that could affect some users of JPMS modules.
2019-08-27 12:16:59 +02:00
Andreas Schildbach
5fb2b44d47 PrivateKeys: Send coins before stopping the PeerGroup. 2019-08-09 11:29:14 +02:00
Sean Gilligan
1394f91d61 Update slf4j to 1.7.27. 2019-08-08 09:43:56 +02:00
Andreas Schildbach
cee5264ab9 build.gradle: Specify javadoc encodings. 2019-07-26 17:14:37 +02:00
Sean Gilligan
951d18b9a7 Update slf4j to 1.7.26. 2019-07-26 10:43:57 +02:00
Andreas Schildbach
d67f060e27 Remove Micropayment Channels.
Now that HTLC-based bi-directional payment channels are state of the art, nobody will ever use the old style.
2019-07-15 11:05:14 +02:00
Sean Gilligan
806afa0441 Replace Guava newArrayList()/newLinkedList() with direct call to the JDK 7 constructor.
This is recommended by deprecation comment in Guava.
2019-06-01 13:58:11 +02:00
Sean Gilligan
7bfeff65f6 build.gradle: Use plugins block rather than 'apply plugin' statements. 2019-04-18 16:41:12 +02:00
Sean Gilligan
783dd45c4b Wallet: Remove (or reduce visibility of) the deprecated constructors.
Replace usages in unit tests and examples with usage of the static createDeterministic() constructor.
2019-04-08 11:23:41 +02:00
Sean Gilligan
170cc80e45 Update Guava to 27.1-android. 2019-04-05 10:31:35 +02:00
Andreas Schildbach
83b1e44d7d settings.gradle: Prefix project names by 'bitcoinj-'. 2019-03-24 10:34:23 +01:00
Andreas Schildbach
08bb331cc3 Update jopt-simple to 5.0.4. 2019-02-15 04:03:39 +01:00
Andreas Schildbach
f24a4aa19a Update Guava to 27.0.1-android. 2019-02-15 03:34:11 +01:00
Andreas Schildbach
34e8bc217a build.gradle: Configure Eclipse plugin. 2019-02-14 23:03:24 +01:00
Andreas Schildbach
bfe2a195b6 Receive to and send from native segwit addresses
- Hierarchical-deterministic derivation of native segwit addresses.
- Receive payments to native segwit addresses.
- Spend and sign payments from native segwit addresses.
- Watch-only wallets with native segwit addresses (zpub/vpub).
- WalletAppKit, Wallet-tool and Wallet-template are taught to deal with segwit-enabled wallets.

Be aware this adds a new field in the wallet protobuf: output_script_type in Key, which keeps track
of the script type of DeterministicKeyChains. Protobufs will be migrated; old DeterministicKeyChains
are assumed to be of type P2PKH.

Includes some code by Fabrice Drouin.
2019-02-11 16:48:37 +01:00
Andreas Schildbach
53a63c43bb Transaction: Add getTxId() and getWTxId(); deprecate getHash() and getHashAsString(). 2019-02-06 02:15:11 +01:00
Andreas Schildbach
a5fd9c6848 KeyBag: Rename method findKeyFromPubHash() to findKeyFromPubKeyHash(). 2019-02-01 18:02:20 +01:00
Andreas Schildbach
53908d8939 KeyBag, TransactionBag: Rename parameters pubkey to pubKey, pubkeyHash to pubKeyHash. 2019-02-01 18:01:45 +01:00
Andreas Schildbach
0875d4a5b3 ECKey: If DER-encoded signatures cannot be parsed, throw SignatureDecodeException rather than RuntimeException. 2019-01-03 11:55:32 +01:00
Andreas Schildbach
7b0a9c207f Update Guava to 25.1-android. 2018-11-27 13:41:58 +01:00
Andreas Schildbach
2992cc16ff build.gradle: Specify source encodings. 2018-10-31 11:12:49 +01:00
Andreas Schildbach
aaa5262ef4 Migrate from Maven to Gradle 3.4 for building. 2018-05-01 16:49:30 +02:00
Andreas Schildbach
7e9c45ad55 ForwardingService: Fix hardcoded fee by simply emptying the entire wallet to the forwarding address. This will make sure the library is calculating the correct fee. 2018-03-13 23:03:48 +01:00
Andreas Schildbach
7f5b6753f5 Use Address whereever possible in the API, rather than LegacyAddress.
This is a preparation for the remaining segwit changes. LegacyAddress
variables in unit tests are also changed.
2018-03-05 10:35:09 +01:00
Andreas Schildbach
e11119b64f Rename VersionedChecksummedBytes→PrefixedChecksummedBytes, Address→LegacyAddress and AbstractAddress→Address.
This also renames corresponding test classes and mentions in comments.
2018-02-28 16:57:16 +01:00
Andreas Schildbach
dedeb01dac Move ECKey.toAddress() to Address.fromKey().
This is a preparation for supporting native segwit addresses. Keys can't know what
type of address is wanted. In future, there will also be a SegwitAddress.fromKey().
2018-02-26 02:13:18 +01:00
Andreas Schildbach
cb01312395 Update to slf4j 1.7.25. 2018-02-23 12:24:06 +01:00
harryge00
911f6d49c0 SendRequest example: Fix the print info. 2018-02-10 17:43:25 +01:00
Andreas Schildbach
c927f0238b Rename variable peers to peerGroup, as the name can be misleading. 2017-12-21 12:47:13 +01:00
Andreas Schildbach
3c9cb34162 Move ScriptException from .core to .script package. 2017-08-14 09:24:18 +02:00
Bo-Ye
3e62906971 FetchBlock example: Enhance this example to be able to connect DNS discovered peers so that you don't need to install bitcoind locally. 2017-07-24 14:17:48 +02:00
Andreas Schildbach
afc198600a Utils: Inline join(). 2017-06-02 16:55:40 +02:00
Andreas Schildbach
e62275d41b Update to Guava 22.0-android. This raises the Java API requirement to 1.7. 2017-05-31 16:37:04 +02:00
Giuseppe Raveduto
1fd8b90f42 Fix SendRequest package in forwarding.js. 2017-02-16 01:39:26 +01:00
Andreas Schildbach
9cbc45aeea PeerAddress: Require NetworkParameters in constructors. 2017-01-10 11:23:25 +01:00
Giuseppe Raveduto
6669d9032c Fix the "TypeError: Java.extend needs at least one type argument" in the forwarding.js example (wrong package). 2016-12-01 13:25:49 +01:00
Andreas Schildbach
ea4a3ed67a Remove tor.js from examples as Tor support was removed from bitcoinj recently. 2016-12-01 13:22:05 +01:00
cyberzac
2e0e81d3a2 Payment channels: Added ClientChannelProperties and ServerChannelProperties to allow configuration of the channels. 2016-08-12 09:48:59 +02:00
Andreas Schildbach
736fd7dbde Add the generic license header to POMs, shell scripts and JavaScript/Python examples. 2016-06-06 21:32:02 +02:00
Andreas Schildbach
3773a4343c Add a generic copyright statement to all license headers that don't have one.
Note it is not legally necessary to state copyright, but we think it makes things easier.
2016-06-06 21:32:02 +02:00
Matthew Shaylor
0b3cc9c59f Replace URLs to code.google.com by the appropriate GitHub URLs. 2016-04-19 23:15:37 +02:00
Andreas Schildbach
a407f04b56 0.15-SNAPSHOT 2016-04-02 18:04:21 +02:00
Andreas Schildbach
9c83299571 Update to slf4j 1.7.20. 2016-04-02 17:05:24 +02:00
Andreas Schildbach
1e66b9a8e3 Finish moving wallet related classes to .wallet package.
These classes are moved to .wallet:
- Wallet + WalletTest
- WalletExtension + WalletExtensionsTest
- WalletProtobufSerializer
- UnreadableWalletException

These classes are moved to .wallet.listeners:
- WalletEventListener
- WalletChangeEventListener
- WalletCoinsReceivedEventListener
- WalletCoinsSentEventListener
- WalletReorganizeEventListener
- ScriptsChangeEventListener
- AbstractWalletEventListener
- KeyChainEventListener
- AbstractKeyChainEventListener
2016-04-01 21:44:30 +02:00
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