Skip to content

Commit

Permalink
Script: remove deprecated methods that take NetworkParameters
Browse files Browse the repository at this point in the history
  • Loading branch information
schildbach committed Sep 2, 2024
1 parent 96c60b6 commit 19d34d9
Showing 1 changed file with 0 additions and 23 deletions.
23 changes: 0 additions & 23 deletions core/src/main/java/org/bitcoinj/script/Script.java
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
import org.bitcoinj.core.LockTime;
import org.bitcoinj.crypto.ECKey;
import org.bitcoinj.base.LegacyAddress;
import org.bitcoinj.core.NetworkParameters;
import org.bitcoinj.core.ProtocolException;
import org.bitcoinj.base.SegwitAddress;
import org.bitcoinj.base.Sha256Hash;
Expand Down Expand Up @@ -424,15 +423,6 @@ public Address getToAddress(Network network) throws ScriptException {
return getToAddress(network, false);
}

/**
* Gets the destination address from this script, if it's in the required form.
* @deprecated Use {@link #getToAddress(Network)}
*/
@Deprecated
public Address getToAddress(NetworkParameters params) throws ScriptException {
return getToAddress(params.network(), false);
}

/**
* Gets the destination address from this script, if it's in the required form.
*
Expand All @@ -455,19 +445,6 @@ else if (ScriptPattern.isP2TR(this))
throw new ScriptException(ScriptError.SCRIPT_ERR_UNKNOWN_ERROR, "Cannot cast this script to an address");
}

/**
* Gets the destination address from this script, if it's in the required form.
*
* @param forcePayToPubKey
* If true, allow payToPubKey to be casted to the corresponding address. This is useful if you prefer
* showing addresses rather than pubkeys.
* @deprecated Use {@link #getToAddress(Network, boolean)}
*/
@Deprecated
public Address getToAddress(NetworkParameters params, boolean forcePayToPubKey) throws ScriptException {
return getToAddress(params.network(), forcePayToPubKey);
}

////////////////////// Interface for writing scripts from scratch ////////////////////////////////

/**
Expand Down

0 comments on commit 19d34d9

Please sign in to comment.