Commit Graph

144 Commits

Author SHA1 Message Date
Andreas Schildbach
c967c6045c build.gradle: remove sourceCompatibility, targetCompatibility
We have defined `release` one way or another, and on JDK 17 that should
suffice.
2024-08-29 23:07:30 +02:00
Andreas Schildbach
34c1e4b708 build.gradle: use tasks.withType() to apply options to tests as well 2024-08-29 22:56:59 +02:00
Andreas Schildbach
94bb527447 build.gradle: migrate --release compiler option to compileJava.options.release for wallettemplate, examples-kotlin, integration-test
For the remaining modules, we're still using Gradle 4.4 so we can't do the same.
2024-08-29 22:01:24 +02:00
Andreas Schildbach
9a61a23f0a build.gradle: target Java 17 for wallettool, tools, integration-test, examples, examples-kotlin 2024-08-29 16:18:43 +02:00
Andreas Schildbach
ba60554425 optimize imports 2024-08-21 13:32:13 +02:00
Andreas Schildbach
a91321af91 build.gradle: update JUnit 5 to 5.10.3 2024-08-03 10:16:36 +02:00
Andreas Schildbach
33a69dcebe build.gradle: update Hamcrest to 3.0 2024-08-03 10:16:36 +02:00
Andreas Schildbach
d56f51ad3b build.gradle: update EasyMock to 5.4.0 2024-08-03 10:16:36 +02:00
Andreas Schildbach
eb8b415d99 build.gradle: update SLF4J to 2.0.13 2024-08-03 10:16:36 +02:00
Andreas Schildbach
6feeb5a1c0 TransactionConfidence: rename getLastBroadcastTime() method from lastBroadcastTime()
This effectively reverts commit c2cabead9a.
2024-05-14 17:51:00 +02:00
Andreas Schildbach
ff42c49648 PeerGroup: rename getFastCatchupTime() method from fastCatchupTime()
This effectively reverts commit 45f87d8339.
2024-05-14 17:51:00 +02:00
Andreas Schildbach
781d64550b Script: rename getCreationTime() method from creationTime()
This effectively reverts commit b309308076.
2024-05-14 17:51:00 +02:00
Sean Gilligan
bd0a36b1e5 build.gradle: update equalsverifier to 3.16.1
This is needed for building with JDK 22.
2024-04-29 09:27:00 +02:00
Andreas Schildbach
5046ad3a49 build.gradle: update SLF4J to 2.0.12 2024-02-09 19:16:44 +01:00
Andreas Schildbach
89e190614a build.gradle: drop the Eclipse plugin
We assume that these days the plugin isn't needed to set up bitcoinj within
Eclipse.
2023-11-19 23:12:10 +01:00
Sean Gilligan
5d3cd2c115 TestWithNetworkConnections: make peerServers final 2023-11-10 12:37:47 +01:00
Sean Gilligan
6219c56138 BlockFileLoaderBitcoindTest: add test streamEntireBitcoindBlockchainAsBlocks()
This test is useful for performance comparisons with
`streamEntireBitcoindBlockchainAsBuffers()`.

With adding to the `TxConfidenceTable` removed from `Block.read()` and
on a fast, modern laptop, `streamEntireBitcoindBlockchainAsBuffers()`
currently takes under 2 minutes while `streamEntireBitcoindBlockchainAsBlocks()`
takes over 5 minutes.
2023-10-24 12:21:22 +02:00
Sean Gilligan
03d6d4cf87 build.gradle: update equalsverifier to 3.15.2 2023-10-24 11:57:41 +02:00
Sean Gilligan
b8b64a339a build.gradle: update SLF4J to 2.0.9 2023-10-24 11:48:23 +02:00
Sean Gilligan
cb740d2eaa PeerTest, PeerGroupTest: replace usage of Guava Lists 2023-10-02 21:10:08 +02:00
Sean Gilligan
647c7ecbd7 TransactionBroadcastTest: use AtomicLong over Guava AtomicDouble
Use `AtomicLong` with some wrapping and unwrapping instead.
2023-10-02 21:06:17 +02:00
Sean Gilligan
1b63903ad3 TestWithPeerGroup: remove unneeded use of ListeningScheduledExecutorService
There is no longer a need to decorate `ScheduledThreadPoolExecutor` to support
`ListeningScheduledExecutorService` since `PeerGroup` no longer uses it.
2023-10-02 20:48:49 +02:00
Sean Gilligan
5513f7dff0 InternalUtils: new helper getUninterruptibly() to replace Guava method
Update usages in `PeerGroup` and `PeerTest`.
2023-10-02 20:44:46 +02:00
Sean Gilligan
2526f5c78a BitcoinSerializer: use Network not NetworkParameters
Also deprecate (unused) method `getParameters()`.
2023-09-30 18:27:28 +02:00
Sean Gilligan
81b78292e2 PeerGroup, FilterMerger: deprecate setting false-positive rate
In the bitcoinj code itself, the false-positive rate is never changed
after constructing a `PeerGroup` or a `FilterMerger`.

* Deprecate methods for setting Bloom Filter FP rate in both methods
* Add constructor params to `PeerGroup` so they can be set at construction
  time, if non-default values are needed
2023-09-16 11:42:24 +02:00
Sean Gilligan
c8bf030824 build.gradle: update EasyMock to 5.2.0 2023-09-02 18:09:47 +02:00
Sean Gilligan
111a8b8a37 ListMessage, InventoryMessage, GetDataMessage: make immutable (after deprecations removed)
Make `ListMessage` and its subclasses "almost" immutable. When the deprecated
`addItem()`, `removeItem()`, etc. methods are removed and the constructors are
changed to create an ummodifiable `List`, they will be immutable.
2023-09-01 18:24:58 +02:00
Sean Gilligan
59ab13680d BlockFileLoader: make stream of ByteBuffer available
* Inner class `BlockFileIterator` now iterates `ByteBuffer`
* `stream()` method calls `MessageSerializer.makeBlock()`
* `streamBuffers()` method makes raw `ByteBuffer` blocks available
* Add integration test `streamEntireBitcoindBlockChainAsBuffers()`
2023-08-23 18:21:01 +02:00
Sean Gilligan
62e2e013c4 BlockFileLoaderBitcoindTest: add blockstore test, improve output 2023-08-23 18:12:51 +02:00
Sean Gilligan
dd8c4ed372 BlockFileLoaderBitcoindTest: new (ignored) integration test that reads bitcoind blocks
This is ignored because:

a) It requires bitcoind installation with a blockchain directory
b) It takes about 1 hour to run
2023-08-23 18:08:56 +02:00
Andreas Schildbach
6b38774a38 PartialMerkleTree: rename method messageSize() from getMessageSize()
Keep the old method as deprecated.
2023-08-10 18:59:58 +02:00
Sean Gilligan
352614280c BlockLocator: deprecate add & no-args constructor
Deprecate `.add()` and no-args constructor in favor of providing complete
list of hashes at creation time.

Update all usages to use the alternative methods.
2023-08-08 21:01:37 +02:00
Sean Gilligan
be650b4464 WalletAppKitLaunchTest: add disabled functional/integration test 2023-08-08 12:12:25 +02:00
Sean Gilligan
6775635ce5 uild.gradle: update JUnit 5 to 5.10.0 2023-07-27 11:01:53 +02:00
Andreas Schildbach
3284b6e309 build.gradle: update JUnit 5 to 5.9.3 2023-07-16 13:05:14 +02:00
Andreas Schildbach
02fd2f036a build.gradle: update equalsverifier to 3.15 2023-07-16 12:45:39 +02:00
Andreas Schildbach
e7017bfc2f KeyChainGroup: migrate to Network from NetworkParameters 2023-04-19 22:58:52 +02:00
Sean Gilligan
9291841f8d Wallet: use Network in static factory methods
* Adds new methods taking `Network` rather than `NetworkParameters`
* Deprecates all converted methods
* Updates tests, examples, and tools that use these calls
2023-04-18 12:47:09 +02:00
Sean Gilligan
5eb67285db Message: rename methods serialize() and messageSize()
Provide deprecated implementations of `bitcoinSerialize()`
and `getMessageSize()`.
2023-04-16 18:49:32 +02:00
Andreas Schildbach
c3d20cb9b4 Ping, Pong: make immutable 2023-04-16 10:32:54 +02:00
Andreas Schildbach
92355b1c32 BloomFilter: move parse() to static constructor read() 2023-04-16 08:26:02 +02:00
Andreas Schildbach
eac2c1fee3 FilteredBlock: move parse() to static constructor read() 2023-04-16 08:07:56 +02:00
Andreas Schildbach
838d14d027 PeerAddress: make immutable
* Static constructors `simple()` and `inet()` that replace the native constructors.
2023-04-13 00:21:36 +02:00
Andreas Schildbach
0401a0cde2 PartialMerkleTree: make immutable 2023-04-13 00:16:16 +02:00
Andreas Schildbach
cd75c6ab6b PartialMerkleTree: divorce from Message
It is never sent on its own, so it doesn't need to be a `Message`.

* Static constructor `read()` replaces the native constructor that deserialized
  from a payload.
* `write()` helper replaces `bitcoinSerializeToStream()`.
* `serialize()` and `getMessageSize()` helpers replace `bitcoinSerialize()`.

Includes a test.
2023-04-13 00:13:24 +02:00
Sean Gilligan
ce07733bbf Wallet: constructor use Network rather than NetworkParameters
With deprecation.
2023-04-11 13:02:11 +02:00
Sean Gilligan
4b9981015c ProtocolVersion: move to top-level class from NetworkParameters
* Rename `getBitcoinProtocolVersion()` to `intValue()`
* Deprecate `NetworkParameters.getProtocolVersionNum()`. This eliminates
  what seems to be an unnecessary level of indirection.
* Add tests.

This will also help eliminate a dependency on `NetworkParameters` in some places.
2023-04-10 01:35:20 +02:00
Sean Gilligan
c4439db699 FakeTxBuilder: use Network not NetworkParameters 2023-04-09 10:33:15 +02:00
Sean Gilligan
7ef88e709e TransactionOutPoint: make hash and index immutable
* Make the two fields `final`
* Rename accessors to `hash()` and `index()`
* Provide deprecated stubs for the old "get" methods
2023-04-04 00:06:47 +02:00
Andreas Schildbach
fbc5185b5a TransactionOutPoint: divorce from Message
It is never sent on its own, so it doesn't need to be a `Message`.

* A static constructur `read()` replaces the native constructor that deserialized
  from a payload.
* A `write()` helper replace `bitcoinSerializeToStream()`.
* A `serialize()` helper replace `bitcoinSerialize()`.
* A `BYTES` constant replaces `getMessageSize()`.

This comes with a test.
2023-04-03 22:17:31 +02:00