From bf03a2602130e6e2f92dac5e8990483a536f4fd9 Mon Sep 17 00:00:00 2001 From: Andreas Schildbach Date: Sat, 26 Jan 2019 23:43:03 +0100 Subject: [PATCH] DeterministicKeyChainTest: Get rid of the KeyChainFactory subclass. It doesn't test anything. --- .../wallet/DeterministicKeyChainTest.java | 20 +------------------ 1 file changed, 1 insertion(+), 19 deletions(-) diff --git a/core/src/test/java/org/bitcoinj/wallet/DeterministicKeyChainTest.java b/core/src/test/java/org/bitcoinj/wallet/DeterministicKeyChainTest.java index dbe36d76..2ee4367e 100644 --- a/core/src/test/java/org/bitcoinj/wallet/DeterministicKeyChainTest.java +++ b/core/src/test/java/org/bitcoinj/wallet/DeterministicKeyChainTest.java @@ -139,25 +139,7 @@ public class DeterministicKeyChainTest { DeterministicKey watching = chain1.getWatchingKey(); List keys = chain1.serializeToProtobuf(); - KeyChainFactory factory = new KeyChainFactory() { - @Override - public DeterministicKeyChain makeKeyChain(Protos.Key key, Protos.Key firstSubKey, DeterministicSeed seed, - KeyCrypter crypter, boolean isMarried, ImmutableList 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); + chain1 = DeterministicKeyChain.fromProtobuf(keys, null).get(0); assertEquals(accountOne, chain1.getAccountPath()); ECKey key2 = chain1.getKey(KeyChain.KeyPurpose.RECEIVE_FUNDS);