mirror of
https://github.com/Qortal/altcoinj.git
synced 2025-07-31 20:11:23 +00:00
DeterministicKeyChainTest: Get rid of the KeyChainFactory subclass. It doesn't test anything.
This commit is contained in:
@@ -139,25 +139,7 @@ public class DeterministicKeyChainTest {
|
|||||||
DeterministicKey watching = chain1.getWatchingKey();
|
DeterministicKey watching = chain1.getWatchingKey();
|
||||||
|
|
||||||
List<Protos.Key> keys = chain1.serializeToProtobuf();
|
List<Protos.Key> keys = chain1.serializeToProtobuf();
|
||||||
KeyChainFactory factory = new KeyChainFactory() {
|
chain1 = DeterministicKeyChain.fromProtobuf(keys, null).get(0);
|
||||||
@Override
|
|
||||||
public DeterministicKeyChain makeKeyChain(Protos.Key key, Protos.Key firstSubKey, DeterministicSeed seed,
|
|
||||||
KeyCrypter crypter, boolean isMarried, ImmutableList<ChildNumber> accountPath) {
|
|
||||||
return DeterministicKeyChain.builder().seed(seed).accountPath(accountPath).build();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public DeterministicKeyChain makeWatchingKeyChain(Protos.Key key, Protos.Key firstSubKey, DeterministicKey accountKey, boolean isFollowingKey, boolean isMarried) {
|
|
||||||
throw new UnsupportedOperationException();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public DeterministicKeyChain makeSpendingKeyChain(Protos.Key key, Protos.Key firstSubKey, DeterministicKey accountKey, boolean isMarried) {
|
|
||||||
throw new UnsupportedOperationException();
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
chain1 = DeterministicKeyChain.fromProtobuf(keys, null, factory).get(0);
|
|
||||||
assertEquals(accountOne, chain1.getAccountPath());
|
assertEquals(accountOne, chain1.getAccountPath());
|
||||||
|
|
||||||
ECKey key2 = chain1.getKey(KeyChain.KeyPurpose.RECEIVE_FUNDS);
|
ECKey key2 = chain1.getKey(KeyChain.KeyPurpose.RECEIVE_FUNDS);
|
||||||
|
Reference in New Issue
Block a user