Addes NetworkParams as a parameter to DeterministicKey serialization/deserialization.

This commit is contained in:
Wojciech Langiewicz
2014-11-11 18:25:21 +01:00
committed by Mike Hearn
parent 3a1c156d4e
commit 41f8f5ccb4
16 changed files with 117 additions and 67 deletions

View File

@@ -432,7 +432,7 @@ public class WalletTool {
String[] xpubkeys = options.valueOf(xpubkeysFlag).split(",");
ImmutableList.Builder<DeterministicKey> keys = ImmutableList.builder();
for (String xpubkey : xpubkeys) {
keys.add(DeterministicKey.deserializeB58(null, xpubkey.trim()));
keys.add(DeterministicKey.deserializeB58(null, xpubkey.trim(), params));
}
MarriedKeyChain chain = MarriedKeyChain.builder()
.random(new SecureRandom())
@@ -913,7 +913,7 @@ public class WalletTool {
}
wallet = Wallet.fromSeed(params, seed);
} else if (options.has(watchFlag)) {
DeterministicKey watchKey = DeterministicKey.deserializeB58(null, options.valueOf(watchFlag));
DeterministicKey watchKey = DeterministicKey.deserializeB58(null, options.valueOf(watchFlag), params);
wallet = Wallet.fromWatchingKey(params, watchKey);
} else {
wallet = new Wallet(params);