private void validateMac(final byte[] candidateMac, final byte[] expectedMac) {
    if (!Arrays.equals(expectedMac, candidateMac)) {
      throw error(
          "Frame MAC did not match expected MAC; expected: %s, received: %s",
          hexDump(expectedMac), hexDump(candidateMac));
    }
  }
Parses, decrypts and performs MAC verification on a frame.

<p>This method expects a well-formed frame, sized according to the length indicated in this
packet's header.

@param f The buffer containing
@param frameSize The expected
ethereum/p2p/src/main/java/org/hyperledger/besu/ethereum/p2p/rlpx/framing/Framer.java