Skip to content

Commit

Permalink
Update SlpAddress fromP2SHHash method
Browse files Browse the repository at this point in the history
  • Loading branch information
pokkst committed Feb 12, 2021
1 parent 8eca494 commit c7ac75d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions core/src/main/java/org/bitcoinj/core/slp/SlpAddress.java
Original file line number Diff line number Diff line change
Expand Up @@ -94,14 +94,14 @@ public static SlpAddress fromP2PKHHash(NetworkParameters params, byte[] hash160)
/**
* Returns an Address that represents the given P2SH script hash.
*/
public static CashAddress fromP2SHHash(NetworkParameters params, byte[] hash160) {
return new CashAddress(params, CashAddress.CashAddressType.Script, hash160);
public static SlpAddress fromP2SHHash(NetworkParameters params, byte[] hash160) {
return new SlpAddress(params, SlpAddress.CashAddressType.Script, hash160);
}

/**
* Returns an Address that represents the script hash extracted from the given scriptPubKey
*/
public static CashAddress fromP2SHScript(NetworkParameters params, Script scriptPubKey) {
public static SlpAddress fromP2SHScript(NetworkParameters params, Script scriptPubKey) {
checkArgument(scriptPubKey.isPayToScriptHash(), "Not a P2SH script");
return fromP2SHHash(params, scriptPubKey.getPubKeyHash());
}
Expand Down

0 comments on commit c7ac75d

Please sign in to comment.