KeyChainFactory: Remove redundant makeKeyChain() variant.

This commit is contained in:
Andreas Schildbach
2019-01-26 21:03:47 +01:00
parent 716cf93716
commit c65f6ac3a2
3 changed files with 0 additions and 26 deletions

View File

@@ -24,16 +24,6 @@ import com.google.common.collect.ImmutableList;
* Default factory for creating keychains while de-serializing.
*/
public class DefaultKeyChainFactory implements KeyChainFactory {
@Override
public DeterministicKeyChain makeKeyChain(Protos.Key key, Protos.Key firstSubKey, DeterministicSeed seed, KeyCrypter crypter, boolean isMarried) {
DeterministicKeyChain chain;
if (isMarried)
chain = new MarriedKeyChain(seed, crypter, null);
else
chain = new DeterministicKeyChain(seed, crypter);
return chain;
}
@Override
public DeterministicKeyChain makeKeyChain(Protos.Key key, Protos.Key firstSubKey, DeterministicSeed seed,
KeyCrypter crypter, boolean isMarried, ImmutableList<ChildNumber> accountPath) {

View File

@@ -25,17 +25,6 @@ import org.bitcoinj.crypto.KeyCrypter;
* Factory interface for creation keychains while de-serializing a wallet.
*/
public interface KeyChainFactory {
/**
* Make a keychain (but not a watching one).
*
* @param key the protobuf for the root key
* @param firstSubKey the protobuf for the first child key (normally the parent of the external subchain)
* @param seed the seed
* @param crypter the encrypted/decrypter
* @param isMarried whether the keychain is leading in a marriage
*/
DeterministicKeyChain makeKeyChain(Protos.Key key, Protos.Key firstSubKey, DeterministicSeed seed, KeyCrypter crypter, boolean isMarried);
/**
* Make a keychain (but not a watching one) with the specified account path
*

View File

@@ -143,11 +143,6 @@ public class DeterministicKeyChainTest {
return DeterministicKeyChain.builder().seed(seed).accountPath(accountPath).build();
}
@Override
public DeterministicKeyChain makeKeyChain(Protos.Key key, Protos.Key firstSubKey, DeterministicSeed seed, KeyCrypter crypter, boolean isMarried) {
return DeterministicKeyChain.builder().seed(seed).build();
}
@Override
public DeterministicKeyChain makeWatchingKeyChain(Protos.Key key, Protos.Key firstSubKey, DeterministicKey accountKey, boolean isFollowingKey, boolean isMarried) {
throw new UnsupportedOperationException();