From ce07733bbfec6499f3bc55853d3b33e11c58ad42 Mon Sep 17 00:00:00 2001 From: Sean Gilligan Date: Sun, 9 Apr 2023 09:40:10 -0700 Subject: [PATCH] Wallet: constructor use `Network` rather than `NetworkParameters` With deprecation. --- .../java/org/bitcoinj/kits/WalletAppKit.java | 2 +- .../main/java/org/bitcoinj/wallet/Wallet.java | 48 +++++++++++-------- .../wallet/WalletProtobufSerializer.java | 9 +++- .../org/bitcoinj/core/BloomFilterTest.java | 2 +- .../store/WalletProtobufSerializerTest.java | 2 +- .../java/org/bitcoinj/wallet/WalletTest.java | 6 +-- .../testing/TestWithNetworkConnections.java | 2 +- 7 files changed, 43 insertions(+), 28 deletions(-) diff --git a/core/src/main/java/org/bitcoinj/kits/WalletAppKit.java b/core/src/main/java/org/bitcoinj/kits/WalletAppKit.java index 7554845e9..57e3f6f2e 100644 --- a/core/src/main/java/org/bitcoinj/kits/WalletAppKit.java +++ b/core/src/main/java/org/bitcoinj/kits/WalletAppKit.java @@ -516,7 +516,7 @@ public class WalletAppKit extends AbstractIdleService implements Closeable { else kcg.fromRandom(preferredOutputScriptType); - return walletFactory.create(params, kcg.build()); + return walletFactory.create(network, kcg.build()); } private void maybeMoveOldWalletOutOfTheWay() { diff --git a/core/src/main/java/org/bitcoinj/wallet/Wallet.java b/core/src/main/java/org/bitcoinj/wallet/Wallet.java index 8fe1d79ae..b671c380e 100644 --- a/core/src/main/java/org/bitcoinj/wallet/Wallet.java +++ b/core/src/main/java/org/bitcoinj/wallet/Wallet.java @@ -246,6 +246,7 @@ public class Wallet extends BaseTaggableObject // A list of scripts watched by this wallet. @GuardedBy("keyChainGroupLock") private final Set