DeterministicKeyChainTest: Fix path constant name.
Use BIP44_COIN_1_ACCOUNT_ZERO_PATH instead of BIP44_ACCOUNT_ONE_PATH.
@@ -56,7 +56,7 @@ public class DeterministicKeyChainTest {
private final byte[] ENTROPY = Sha256Hash.hash("don't use a string seed like this in real life".getBytes());
private static final NetworkParameters UNITTEST = UnitTestParams.get();
private static final NetworkParameters MAINNET = MainNetParams.get();
- private static final ImmutableList<ChildNumber> BIP44_ACCOUNT_ONE_PATH = ImmutableList.of(new ChildNumber(44, true),
+ private static final ImmutableList<ChildNumber> BIP44_COIN_1_ACCOUNT_ZERO_PATH = ImmutableList.of(new ChildNumber(44, true),
new ChildNumber(1, true), ChildNumber.ZERO_HARDENED);
@Before
@@ -73,7 +73,7 @@ public class DeterministicKeyChainTest {
.accountPath(DeterministicKeyChain.ACCOUNT_ONE_PATH).outputScriptType(Script.ScriptType.P2WPKH).build();
segwitChain.setLookaheadSize(10);
- bip44chain = DeterministicKeyChain.builder().entropy(ENTROPY, secs).accountPath(BIP44_ACCOUNT_ONE_PATH)
+ bip44chain = DeterministicKeyChain.builder().entropy(ENTROPY, secs).accountPath(BIP44_COIN_1_ACCOUNT_ZERO_PATH)
.outputScriptType(Script.ScriptType.P2PKH).build();
bip44chain.setLookaheadSize(10);
}
@@ -316,7 +316,7 @@ public class DeterministicKeyChainTest {
// Round trip the data back and forth to check it is preserved.
int oldLookaheadSize = bip44chain.getLookaheadSize();
bip44chain = DeterministicKeyChain.fromProtobuf(keys, null).get(0);
- assertEquals(BIP44_ACCOUNT_ONE_PATH, bip44chain.getAccountPath());
+ assertEquals(BIP44_COIN_1_ACCOUNT_ZERO_PATH, bip44chain.getAccountPath());
assertEquals(EXPECTED_SERIALIZATION, protoToString(bip44chain.serializeToProtobuf()));
assertEquals(key1, bip44chain.findKeyFromPubHash(key1.getPubKeyHash()));
assertEquals(key2, bip44chain.findKeyFromPubHash(key2.getPubKeyHash()));
@@ -460,7 +460,7 @@ public class DeterministicKeyChainTest {
List<Protos.Key> serialization = chain.serializeToProtobuf();
checkSerialization(serialization, "watching-wallet-arbitrary-path-serialization.txt");
chain = DeterministicKeyChain.fromProtobuf(serialization, null).get(0);
- assertEquals(BIP44_ACCOUNT_ONE_PATH, chain.getAccountPath());
+ assertEquals(BIP44_COIN_1_ACCOUNT_ZERO_PATH, chain.getAccountPath());
final DeterministicKey rekey4 = chain.getKey(KeyChain.KeyPurpose.CHANGE);
assertEquals(key4.getPubKeyPoint(), rekey4.getPubKeyPoint());
}
@@ -648,7 +648,7 @@ public class DeterministicKeyChainTest {
KeyChainGroup group = KeyChainGroup.builder(params).addChain(DeterministicKeyChain.builder().spend(accountKey)
.outputScriptType(bip44chain.getOutputScriptType()).build()).build();
DeterministicKeyChain fromMasterKeyChain = group.getActiveKeyChain();
- assertEquals(BIP44_ACCOUNT_ONE_PATH, fromMasterKeyChain.getAccountPath());
+ assertEquals(BIP44_COIN_1_ACCOUNT_ZERO_PATH, fromMasterKeyChain.getAccountPath());
assertEquals(secs, fromMasterKeyChain.getEarliestKeyCreationTime());
fromMasterKeyChain.setLookaheadSize(10);
fromMasterKeyChain.maybeLookAhead();
