Commit Graph

4448 Commits

Author SHA1 Message Date
Sean Gilligan
8576602180 BlockFileLoader: convert to Network, deprecate constructors with NetworkParameters 2023-03-30 18:59:19 +02:00
Andreas Schildbach
3e8f7d93a7 DummySerializer: make capable of pretending specific protocol version
This is put to use for the "misuse of protocol version" for `PeerAddress`.
2023-03-30 18:17:16 +02:00
Andreas Schildbach
773a9aeb4e PeerAddress: remove params from constructor
To make this possible, a port has to be specified in all cases.
2023-03-30 18:03:18 +02:00
Andreas Schildbach
6472080ab3 Message: remove method unCache()
It's still implemented in `Block`, `Transaction`, `TransactionInput` and
`TransactionOutput`. But there is no need to have it in the superclass.
2023-03-30 18:00:34 +02:00
Andreas Schildbach
b9d37e024f Message: get rid of payload field
It's now passed into the `parse()` method, and passed along from there.
2023-03-30 17:58:22 +02:00
Andreas Schildbach
9c9548dc23 TransactionOutput: remove serializer from constructor 2023-03-30 15:09:44 +02:00
Andreas Schildbach
c1a32f6585 TransactionInput: remove serializer from constructor 2023-03-30 15:06:41 +02:00
Andreas Schildbach
8091384ff6 UnknownMessage: make field name immutable 2023-03-30 14:29:17 +02:00
Andreas Schildbach
455973557a Message: add a defensive null check to getParams() 2023-03-30 13:15:05 +02:00
Sean Gilligan
3bc82cd9f7 TransactionInput, TransactionOutput: make direct subclass of Message
Since only these 2 classes need to support the concept of a "parent", it
will be simpler to just add the code to handle that to both of them and
remove the `ChildMessage` altogether.
2023-03-30 11:33:29 +02:00
Sean Gilligan
368d2f2c63 BlockFileLoader: don't use NetworkParameters internally
Save `packetMagic` and `serializer` instead.
2023-03-30 01:50:14 +02:00
Andreas Schildbach
57c9456ce8 TransactionOutPoint: remove params from constructors 2023-03-30 01:42:50 +02:00
Andreas Schildbach
42bf963d92 MessageTest: remove params from VarStrMessage
This time for real.
2023-03-30 01:32:02 +02:00
Andreas Schildbach
54d0c80e16 GetBlocksMessage, GetHeadersMessage: remove params from constructors
Because the serialized messages contain the protocol version – for whatever
reason, possibly unused – that value is now passed instead.
2023-03-30 01:25:19 +02:00
Sean Gilligan
4a62b0f53d Fix spelling of "freestanding" in comments 2023-03-30 01:22:29 +02:00
Andreas Schildbach
a3d8d24d6f MessageTest: remove params from VarStrMessage 2023-03-30 01:19:54 +02:00
Andreas Schildbach
ed84988111 MemoryPoolMessage: make it an EmptyMessage 2023-03-30 01:16:03 +02:00
Andreas Schildbach
d02853b1f0 TransactionOutPoint: make direct subclass of Message
It doesn't need a parent.
2023-03-30 01:04:41 +02:00
Andreas Schildbach
dabed6fa2d Transaction: make direct subclass of Message
It doesn't need a parent.
2023-03-30 01:02:49 +02:00
Andreas Schildbach
1a007c1182 PeerAddress: make direct subclass of Message
It doesn't need a parent.
2023-03-30 00:45:25 +02:00
Andreas Schildbach
32ee59f7bb BloomFilter: remove params from constructor 2023-03-30 00:31:02 +02:00
Sean Gilligan
21217e3c0b BockFileLoader: make field fileIt immutable 2023-03-30 00:26:02 +02:00
Sean Gilligan
2d054d4e49 Fix spelling of "human readable" in comments and message 2023-03-30 00:20:06 +02:00
Andreas Schildbach
795f64b43d Message: from within the hierarchy, construct child messages directly
There is no point in taking the `MessageSerializer` route.
2023-03-30 00:15:37 +02:00
Andreas Schildbach
b2c54e8bf4 FeeFilterMessage: remove params and serializer from constructor 2023-03-29 23:51:13 +02:00
Andreas Schildbach
5ea7d64ee4 RejectMessage: remove params from constructors 2023-03-29 23:48:13 +02:00
Andreas Schildbach
780e43d94d Ping, Pong: remove params from constructors 2023-03-29 23:41:13 +02:00
Andreas Schildbach
dd2213c7e1 ListMessage: remove params and serializer from constructors in hierarchy 2023-03-29 23:37:17 +02:00
Andreas Schildbach
7d74722eeb TransactionOutPoint: remove serializer from constructor 2023-03-29 23:21:01 +02:00
Andreas Schildbach
9a0c3d91e3 EmptyMessage: remove params and payload from constructors in hierarchy
Empty messages don't need any of these.
2023-03-29 17:57:41 +02:00
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