DeterministicKeyChain: replace PeekingIterator with standard Iterator
No features of the PeekingIterator were being used.
@@ -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();
