code: public void markPubKeyAsUsed(byte[] pubkey) {
          if (chains != null) {
              for (DeterministicKeyChain chain : chains) {
                  DeterministicKey key;
                  if ((key = chain.markPubKeyAsUsed(pubkey)) != null) {
                      maybeMarkCurrentKeyAsUsed(key);
                      return;
                  }
              }
          }
      }
docs: Mark the DeterministicKeys as used, if they match the pubkey
  See {@link DeterministicKeyChain#markKeyAsUsed(DeterministicKey)} for more info on this.