mirror of
https://github.com/Qortal/altcoinj.git
synced 2025-02-19 13:45:48 +00:00
Wallet: Fix crash when isAddressMine() is called with a P2SH or a P2WSH address.
This commit is contained in:
parent
937d93e024
commit
1d8c78f327
@ -1173,6 +1173,10 @@ public class Wallet extends BaseTaggableObject
|
|||||||
final ScriptType scriptType = address.getOutputScriptType();
|
final ScriptType scriptType = address.getOutputScriptType();
|
||||||
if (scriptType == ScriptType.P2PKH || scriptType == ScriptType.P2WPKH)
|
if (scriptType == ScriptType.P2PKH || scriptType == ScriptType.P2WPKH)
|
||||||
return isPubKeyHashMine(address.getHash(), scriptType);
|
return isPubKeyHashMine(address.getHash(), scriptType);
|
||||||
|
else if (scriptType == ScriptType.P2SH)
|
||||||
|
return isPayToScriptHashMine(address.getHash());
|
||||||
|
else if (scriptType == ScriptType.P2WSH)
|
||||||
|
return false;
|
||||||
else
|
else
|
||||||
throw new IllegalArgumentException(address.toString());
|
throw new IllegalArgumentException(address.toString());
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user