Skip to content

Commit

Permalink
BitcoinClient: remove deprecated NetworkParameters support
Browse files Browse the repository at this point in the history
* Remove constructor that takes NetworkParameters
* Remove getNetworkParams()
  • Loading branch information
msgilligan committed Sep 26, 2023
1 parent 81c6f07 commit 3f4234d
Showing 1 changed file with 1 addition and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@
import org.bitcoinj.base.Coin;
import org.bitcoinj.core.Context;
import org.bitcoinj.crypto.ECKey;
import org.bitcoinj.core.NetworkParameters;
import org.bitcoinj.base.Sha256Hash;
import org.bitcoinj.core.Transaction;
import org.consensusj.jsonrpc.JsonRpcTransport;
Expand Down Expand Up @@ -174,11 +173,6 @@ public BitcoinClient(Network network, URI server, String rpcuser, String rpcpass
this(JsonRpcTransport.getDefaultSSLContext(), network, server, rpcuser, rpcpassword);
}

@Deprecated
public BitcoinClient(NetworkParameters netParams, URI server, String rpcuser, String rpcpassword) {
this(netParams.network(), server, rpcuser, rpcpassword);
}

/**
* Construct a BitcoinClient from an RPCConfig data object.
* @param config Contains URI, user name, and password
Expand All @@ -187,16 +181,6 @@ public BitcoinClient(RpcConfig config) {
this(config.network(), config.getURI(), config.getUsername(), config.getPassword());
}

/**
* Get network parameters
* @return network parameters for the server
* @deprecated Use {@link #getNetwork()}
*/
@Deprecated
public synchronized NetworkParameters getNetParams() {
return NetworkParameters.of(getNetwork());
}

/**
* Get network.
* <p>
Expand Down Expand Up @@ -285,6 +269,7 @@ private CompletableFuture<Network> getNetworkFromServer() {
});
}

// TODO: I believe the circular dependency in RpcClientModule has been fixed, so this can be removed
/**
* Return {@code BlockchainInfo} as a {@link Map}. This avoids use of {@link RpcClientModule} and a circular dependency on {@link Network}
* @return {@code getblockchaininfo} response JSON as a {@link Map}
Expand Down

0 comments on commit 3f4234d

Please sign in to comment.