walletnode toString refactor

This commit is contained in:
Craig Raw 2021-10-27 12:00:02 +02:00
parent 99440eda7f
commit 24d9e5fcda
2 changed files with 3 additions and 3 deletions

View file

@ -1038,7 +1038,7 @@ public class Wallet extends Persistable implements Comparable<Wallet> {
for(TransactionInput txInput : signingNodes.keySet()) {
WalletNode walletNode = signingNodes.get(txInput);
Map<ECKey, Keystore> keystoreKeysForNode = getKeystores().stream().collect(Collectors.toMap(keystore -> getScriptType().getOutputKey(keystore.getPubKey(walletNode)), Function.identity(),
(u, v) -> { throw new IllegalStateException("Duplicate keys from different keystores for node " + walletNode.getDerivationPath()); },
(u, v) -> { throw new IllegalStateException("Duplicate keys from different keystores for node " + walletNode); },
LinkedHashMap::new));
Map<ECKey, TransactionSignature> keySignatureMap = new LinkedHashMap<>();
@ -1138,7 +1138,7 @@ public class Wallet extends Persistable implements Comparable<Wallet> {
for(PSBTInput psbtInput : signingNodes.keySet()) {
WalletNode walletNode = signingNodes.get(psbtInput);
Map<ECKey, Keystore> keystoreKeysForNode = getKeystores().stream().collect(Collectors.toMap(keystore -> getScriptType().getOutputKey(keystore.getPubKey(walletNode)), Function.identity(),
(u, v) -> { throw new IllegalStateException("Duplicate keys from different keystores for node " + walletNode.getDerivationPath()); },
(u, v) -> { throw new IllegalStateException("Duplicate keys from different keystores for node " + walletNode); },
LinkedHashMap::new));
Map<ECKey, TransactionSignature> keySignatureMap;

View file

@ -158,7 +158,7 @@ public class WalletNode extends Persistable implements Comparable<WalletNode> {
@Override
public String toString() {
return derivationPath;
return derivationPath.replace("m", "..");
}
@Override