PeerAddress: make onionChecksum static

The onionChecksum() method uses no instance variables and has no side-effects,
so it can be static.
This commit is contained in:
Sean Gilligan 2022-08-18 09:18:15 -07:00 committed by Andreas Schildbach
parent bdc174e9bc
commit 22f02955d7

View file

@ -285,7 +285,7 @@ public class PeerAddress extends ChildMessage {
}
}
private byte[] onionChecksum(byte[] pubkey, byte version) {
private static byte[] onionChecksum(byte[] pubkey, byte version) {
if (pubkey.length != 32)
throw new IllegalArgumentException();
SHA3.Digest256 digest256 = new SHA3.Digest256();