mirror of
https://github.com/Qortal/altcoinj.git
synced 2025-07-30 19:41:24 +00:00
KeyChainFactory: Remove redundant makeKeyChain() variant.
This commit is contained in:
@@ -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) {
|
||||
|
@@ -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
|
||||
*
|
||||
|
@@ -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();
|
||||
|
Reference in New Issue
Block a user