Commit Graph

121 Commits

Author SHA1 Message Date
Sean Gilligan
bb8687f278 Wallet: add WalletFactory parameter to loadFromFile() 2022-04-15 14:56:27 +02:00
Sean Gilligan
e6dd75d823 wallettool: add some first basic JUnit 5 tests
Also update gradle.yml to upload test results to GitHub.
2022-04-15 14:42:58 +02:00
Sean Gilligan
05b0ee144b WalletTool: declare specific exceptions for call() 2022-04-14 15:33:22 +02:00
Sean Gilligan
eede925c96 Wallet: add loadFromFile method that supports WalletTool
* Add `Wallet.loadFromFile` that takes options needed by WalletTool
* Add `Wallet.loadFromFileStream` that supports the extra options
* Update `WalletTool` to use the new `loadFromFile` method
2022-04-12 17:38:19 +02:00
Sean Gilligan
1219e0d7b0 InternalUtils: replace Guava Joiner and Splitter with native JDK equivalent
Also deprecate the old Joiner and Splitter related members of Utils.
2022-04-10 16:20:00 +02:00
Sean Gilligan
56d89f37ac WalletTool: remove unnecessary null assignments 2022-04-09 10:54:52 +02:00
Sean Gilligan
3ea2dc40d9 WalletTool: remove superfluous throws Exception from main
main() currently throws no checked exceptions. This is a good thing and
means all checked exceptions are caught and (hopefully properly) handled by
outputting error messages and return a non-zero exit code.
2022-04-01 20:27:13 +02:00
Sean Gilligan
1343776286 convert ImmutableList to unmodifiable list
This converts all remaining instances of ImmutableList (except those
in core tests) to JDK unmodifiable list.
2022-03-30 16:33:22 +02:00
Sean Gilligan
25d4b8b8a0 WalletTool: improve sendPayment() exception handling
* Split the long `try` block into multiple `try/catch` blocks
* Consistently use System.err.println and System.exit on errors
* System.out.println an information message before falling back to `broadcastPayment`
2022-03-25 20:35:35 +01:00
Sean Gilligan
091fdd9791 PaymentSession: proper future-style error handling for sendPayment()
This is a breaking change, but the existing code is not using futures properly and
fixing this is worth the breakage.

* Instead of returning `null`, return a failed future
* Instead of throwing errors, return failed futures
2022-03-25 19:33:08 +01:00
Sean Gilligan
a20db6ed2c WalletTool: migrate from ListenableFuture to CompletableFuture 2022-03-07 23:24:18 +01:00
Sean Gilligan
55b87f497c build.gradle: fix hasAnnotationProcessor check 2022-03-05 00:07:12 +01:00
Sean Gilligan
4cde8940fc wallettool/build.gradle: generate man, html5 and adoc manpages
Adds the picocli-codegen annotation processor.

To build the documentation use `gradle bitcoinj-wallettool:asciidoctor`. The results are in:

 * wallettool/build/generated-picocli-docs/wallet-tool.adoc (asciidoc source)
 * wallettool/build/docs/html5/wallet-tool.html (HTML version)
 * wallettool/build/docs/manpage/wallet-tool.1 (man format)
2022-02-25 21:46:54 +01:00
Sean Gilligan
0a1e1ca8a0 WalletTool: extract common code from dumpWallet() into printWallet() 2022-02-23 16:11:18 +01:00
Andreas Schildbach
f3a314e2d9 global replace SegWit by segwit 2022-02-18 10:42:12 +01:00
Sean Gilligan
7626b27850 build.gradle: update picocli to 4.6.3 2022-02-18 09:02:24 +01:00
Sean Gilligan
ea208935ff build.gradle: Update SLF4J to 1.7.36
Starting with version 1.7.36, SLF4J releases are reproducible.
2022-02-18 08:54:36 +01:00
Andreas Schildbach
435e39a841 Utils: add bytesToBigInteger() helper and use it
This is the antagonist to Utils.bigIntegerToBytes().
2022-02-11 16:17:24 +01:00
Andreas Schildbach
6ad636ccec SigNetParams: support signet 2022-02-11 10:52:49 +01:00
Kasim G
a31cbe0470 apply "Anonmyous type can be replaced with lambda" refactoring 2022-01-28 17:18:42 +01:00
Sean Gilligan
da6d6be288 WalletTool: Move to its own wallettool submodule 2022-01-05 00:24:42 +01:00