DeterministicKeyChain: replace PeekingIterator with standard Iterator

No features of the PeekingIterator were being used.
This commit is contained in:
Sean Gilligan 2022-04-14 08:06:01 -07:00 committed by Andreas Schildbach
parent 309c0e2448
commit b57e93cf61

View file

@ -29,8 +29,6 @@ import org.bitcoinj.wallet.listeners.KeyChainEventListener;
import com.google.common.base.MoreObjects;
import com.google.common.base.Stopwatch;
import com.google.common.collect.Iterators;
import com.google.common.collect.PeekingIterator;
import com.google.protobuf.ByteString;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@ -808,7 +806,7 @@ public class DeterministicKeyChain implements EncryptableKeyChain {
HDPath accountPath = HDPath.M();
Script.ScriptType outputScriptType = Script.ScriptType.P2PKH;
PeekingIterator<Protos.Key> iter = Iterators.peekingIterator(keys.iterator());
Iterator<Protos.Key> iter = keys.iterator();
while (iter.hasNext()) {
Protos.Key key = iter.next();
final Protos.Key.Type t = key.getType();