@@ -1453,7 +1453,7 @@ public String toString() {
1453
1453
return helper .toString ();
1454
1454
}
1455
1455
1456
- public String toString (boolean includeLookahead , boolean includePrivateKeys , @ Nullable AesKey aesKey , NetworkParameters params ) {
1456
+ public String toString (boolean includeLookahead , boolean includePrivateKeys , @ Nullable AesKey aesKey , Network network ) {
1457
1457
final DeterministicKey watchingKey = getWatchingKey ();
1458
1458
final StringBuilder builder = new StringBuilder ();
1459
1459
if (seed != null ) {
@@ -1487,15 +1487,21 @@ public String toString(boolean includeLookahead, boolean includePrivateKeys, @Nu
1487
1487
builder .append ("\n " );
1488
1488
}
1489
1489
builder .append ("Ouput script type: " ).append (outputScriptType ).append ('\n' );
1490
- builder .append ("Key to watch: " ).append (watchingKey .serializePubB58 (params . network () , outputScriptType ))
1490
+ builder .append ("Key to watch: " ).append (watchingKey .serializePubB58 (network , outputScriptType ))
1491
1491
.append ('\n' );
1492
1492
builder .append ("Lookahead siz/thr: " ).append (lookaheadSize ).append ('/' ).append (lookaheadThreshold ).append ('\n' );
1493
- formatAddresses (includeLookahead , includePrivateKeys , aesKey , params , builder );
1493
+ formatAddresses (includeLookahead , includePrivateKeys , aesKey , network , builder );
1494
1494
return builder .toString ();
1495
1495
}
1496
1496
1497
+ /** @deprecated use {@link #toString(boolean, boolean, AesKey, Network)} */
1498
+ @ Deprecated
1499
+ public String toString (boolean includeLookahead , boolean includePrivateKeys , @ Nullable AesKey aesKey , NetworkParameters params ) {
1500
+ return toString (includeLookahead , includePrivateKeys , aesKey , params .network ());
1501
+ }
1502
+
1497
1503
protected void formatAddresses (boolean includeLookahead , boolean includePrivateKeys , @ Nullable AesKey aesKey ,
1498
- NetworkParameters params , StringBuilder builder ) {
1504
+ Network network , StringBuilder builder ) {
1499
1505
for (DeterministicKey key : getKeys (includeLookahead , true )) {
1500
1506
String comment = null ;
1501
1507
if (key .equals (getRootKey ()))
@@ -1510,7 +1516,7 @@ else if (internalParentKey.equals(key.getParent()) && key.getChildNumber().i() >
1510
1516
comment = "*" ;
1511
1517
else if (externalParentKey .equals (key .getParent ()) && key .getChildNumber ().i () >= issuedExternalKeys )
1512
1518
comment = "*" ;
1513
- key .formatKeyWithAddress (includePrivateKeys , aesKey , builder , params . network () , outputScriptType , comment );
1519
+ key .formatKeyWithAddress (includePrivateKeys , aesKey , builder , network , outputScriptType , comment );
1514
1520
}
1515
1521
}
1516
1522
0 commit comments