3
0
mirror of https://github.com/Qortal/altcoinj.git synced 2025-02-14 11:15:51 +00:00

KeyChainGroup: Inline method makeP2SHOutputScript().

This commit is contained in:
Andreas Schildbach 2019-02-06 15:33:35 +01:00
parent 0d90157749
commit 6278dc39b1

View File

@ -132,7 +132,9 @@ public class KeyChainGroup implements KeyBag {
if (isMarried()) {
for (Map.Entry<KeyChain.KeyPurpose, DeterministicKey> entry : this.currentKeys.entrySet()) {
Address address = makeP2SHOutputScript(entry.getValue(), getActiveKeyChain()).getToAddress(params);
Address address = ScriptBuilder
.createP2SHOutputScript(getActiveKeyChain().getRedeemData(entry.getValue()).redeemScript)
.getToAddress(params);
currentAddresses.put(entry.getKey(), address);
}
}
@ -624,10 +626,6 @@ public class KeyChainGroup implements KeyBag {
throw new UnsupportedOperationException(); // Unused.
}
private Script makeP2SHOutputScript(DeterministicKey followedKey, DeterministicKeyChain chain) {
return ScriptBuilder.createP2SHOutputScript(chain.getRedeemData(followedKey).redeemScript);
}
/** Adds a listener for events that are run when keys are added, on the user thread. */
public void addEventListener(KeyChainEventListener listener) {
addEventListener(listener, Threading.USER_THREAD);