Andreas Schildbach
8a1a462128
ProtocolException, VerificationException: allow construction without message
...
This makes usage of `ProtocolException::new` easier.
2023-03-29 17:57:41 +02:00
Andreas Schildbach
bc035737d1
Message: inline all read helpers
...
They were only calling through anyways.
2023-03-29 16:57:08 +02:00
Andreas Schildbach
ce39967d83
Buffers: new utils class for common operations on P2P message ByteBuffer
2023-03-29 16:49:07 +02:00
Andreas Schildbach
1869fa197e
.gitlab-ci.yml: use headless variant of the JDK
2023-03-29 15:19:35 +02:00
Sean Gilligan
02f3fe64cc
ECKeyTest: add tests for deriving addresses from ECKey
via toAddress()
...
`createP2TRAddress()` is ignored for now because it's not yet supported.
2023-03-29 13:32:11 +02:00
Sean Gilligan
458e4c1e0b
ListenableCompletionStage: deprecate addListener()
...
When people upgrade to 0.17 this deprecation will make it clear
that they need to switch from this method to `thenRunAsync()`.
Reminder: we did not deprecate `ListenableCompletionStage` or `ListenableCompletableFuture`
because they are still used in many places in the bitcoinj API, but this
method is not used anywhere in bitcoinj.
2023-03-29 00:00:08 +02:00
Andreas Schildbach
592f3c692d
Services: wrapper for node services bitfield
2023-03-28 15:52:05 +02:00
Andreas Schildbach
3bd191843a
peerseeds.proto: remove protobuf definition
...
This was forgotten when removing `HttpDiscovery` via
commit 7f41553576
.
2023-03-28 10:50:49 +02:00
Andreas Schildbach
63b5e07726
PaymentSessionTest: fix context not initialized
2023-03-28 00:34:28 +02:00
Andreas Schildbach
46e562bb20
Prepare 0.17-SNAPSHOT
2023-03-28 00:27:46 +02:00
Andreas Schildbach
f3075c44b6
Tag 0.17-alpha1
2023-03-27 23:56:19 +02:00
Sean Gilligan
3b7c630eb4
ForwardingService: move args parsing to constructor
...
This simplifies the overall flow for tutorial purposes.
2023-03-27 23:23:44 +02:00
Sean Gilligan
65466f8908
ForwardingService: combine methods main()
and forward()
2023-03-27 22:21:58 +02:00
Sean Gilligan
1b5fdcaa77
ForwardingService: use awaitRelayed()
without extra thenApply()
in coinForwardingListener()
2023-03-27 22:07:22 +02:00
Andreas Schildbach
8f504d3795
ForwardingService: return error code 1 on bad command line usage
2023-03-27 22:00:02 +02:00
Sean Gilligan
49290a8ce0
ForwardingService: rename coinForwardingListener
from coinsReceivedListener
2023-03-27 21:43:59 +02:00
Sean Gilligan
a0c5501b4b
ForwardingService: improve JavaDoc
2023-03-27 21:35:04 +02:00
Sean Gilligan
7cd8f80e44
ForwardingService: fix usage message
2023-03-27 21:32:24 +02:00
Andreas Schildbach
c38ec69246
BriefLogFormatter: provide init(Level)
to use a custom log level
2023-03-27 21:02:59 +02:00
Sean Gilligan
3b6bdbad02
WalletAppKit: add launch()
methods, simplify examples
2023-03-27 20:59:58 +02:00
Sean Gilligan
41ed5a984b
Wallet: deprecate public fields in SendResult
, replace with accessors
...
* Deprecate public fields in `SendResult`
* Make available equivalent accessors
* Update all usages
This prepares the way for replacing `SendResult` with `TransactionBroadcast`
in the future.
2023-03-27 20:22:35 +02:00
Sean Gilligan
774fde99fb
Wallet: move methods sendTransaction()
and waitForConfirmation()
from ForwardingService
...
`waitForConfirmation()` now has two variants for convenience.
2023-03-27 19:30:27 +02:00
Sean Gilligan
b24964d056
TransactionBroadcast: add awaitRelayed()
, deprecate future()
...
* Add `awaitRelayed()` method that returns a CF that completes when relaying is confirmed.
* Deprecate `future()` and reimplement it using `awaitRelayed()`.
2023-03-27 18:38:15 +02:00
Andreas Schildbach
504b67c186
ByteUtils: check range of values supplied to write helpers for the Java Unsigned Integer API
...
These checks uncovered various uses of illegal values (now fixed).
They should help this won't happen in future.
2023-03-27 17:53:26 +02:00
Sean Gilligan
2aa764d403
VarInt: simplify encode()
2023-03-27 17:38:58 +02:00
Andreas Schildbach
3746516859
VarInt: use constants for possible sizes
2023-03-27 16:54:00 +02:00
Andreas Schildbach
140912b080
VarIntTest: add test for reading and writing
2023-03-27 16:49:21 +02:00
Andreas Schildbach
21fae58bc8
VarInt: implement toString()
2023-03-27 16:48:47 +02:00
Andreas Schildbach
301c8e4a76
VarInt: implement equals()
and hashCode()
...
`originallyEncodedSize` is not considered on purpose, because it is only
relevant for serialization.
2023-03-27 16:26:16 +02:00
Andreas Schildbach
2faaf9febc
VarInt: direct use of ByteBuffer
for reading and writing
2023-03-27 16:00:37 +02:00
Sean Gilligan
b4abf7d794
VarInt: get rid of code duplication in deprecated constructor
2023-03-27 15:50:13 +02:00
Andreas Schildbach
b528fb5180
build.gradle: update SLF4J to 2.0.7
...
Starting with SLF4J 2.0.0, we can use the fluent logger API.
2023-03-27 15:25:02 +02:00
Sean Gilligan
2e3e6d4485
TransactionBroadcast: add awaitSent()
method
...
This just returns the used internally (and therefore tested) `sentFuture`.
2023-03-27 12:28:27 +02:00
Sean Gilligan
bce7b11038
Script: downsize MAX_SCRIPT_ELEMENT_SIZE
to int
from long
...
* The value is 520
* Java collection sizes are `int`
* All usages are as `int`
2023-03-27 09:54:42 +02:00
Sean Gilligan
ee74f34dcc
FullBlockTestGenerator: use writeInt64LE()
for writing a 64-bit integer
...
Previously two `writeInt32LE()` and a right-shift on an `int` by 32 were used.
2023-03-27 09:48:01 +02:00
Sean Gilligan
37a06b150f
Transaction: replace Guava Lists.reversed()
with JDK equivalent
2023-03-27 09:38:38 +02:00
Andreas Schildbach
c5faecf3b6
SegwitAddress: flip arguments of new static constructor fromBech32()
...
Otherwise the deprecation cycle won't be of much use for consumers who pass `null` for `params`.
2023-03-27 09:23:04 +02:00
Andreas Schildbach
150c911750
LegacyAddress: flip arguments of new static constructor fromBase58()
...
Otherwise the deprecation cycle won't be of much use for consumers who pass `null` for `params`.
2023-03-27 09:17:37 +02:00
Andreas Schildbach
4bdb0f85e4
BitcoinURI: flip arguments of new constructor
...
Otherwise the deprecation cycle won't be of much use for consumers who pass `null` for `params`.
2023-03-27 09:14:11 +02:00
Sean Gilligan
b13fe5a5d2
ForwardingService: make coinsReceivedListener()
use wallet
parameter
...
...instead of `kit.wallet()`.
2023-03-27 09:11:17 +02:00
Sean Gilligan
3ad07ea28c
ForwardingService: rename forwardingCoinSelector()
parameter
...
...to `parentTxId` (which is more clear and correct)
2023-03-27 09:08:27 +02:00
Sean Gilligan
884072c9e3
WalletAppKit: make Closeable
2023-03-26 19:40:28 +02:00
Sean Gilligan
84c8a2887a
ForwardingService: make Closable
not AutoCloseable
...
`Closeable` implements `AutoCloseable` but narrows the exception thrown
from `Exception` to `IOException`. ForwardingService.close() currently
doesn't throw any exceptions.
2023-03-26 19:37:08 +02:00
Andreas Schildbach
c10cf7ccbe
Sha256Hash: direct use of ByteBuffer
in hashCode()
...
A hash code is just an arbitrary number. It doesn't care about signedness and endianess.
2023-03-26 19:07:22 +02:00
Andreas Schildbach
d478eb2a55
Network: migrate legacyAddressHeader()
and legacyP2SHHeader()
from NetworkParameters
2023-03-26 18:59:51 +02:00
Andreas Schildbach
ba72884832
Transaction: add back a byte[]
-based constructor as deprecated
2023-03-26 18:53:06 +02:00
Sean Gilligan
c05fefe8f8
MarriedKeyChain: simplify Builder.followingKeys()
...
* Add `followingKey()` method that takes a single key
* Deprecate unused `followingKeys(DeterministicKey, DeterministicKey...)`
* Replace usage of Guava's `Lists.asList()`
2023-03-26 18:49:32 +02:00
Sean Gilligan
6e1fc2cda9
WalletTool: rename tx
from t
in send()
2023-03-26 18:15:54 +02:00
Sean Gilligan
17f9b1dcfe
WalletTool: don't unnecessarily reinitialize tx variable t
in send()
2023-03-26 18:13:43 +02:00
Sean Gilligan
f58d07a623
ForwardingService: start()
returns receiving address
2023-03-26 18:10:09 +02:00