File tree Expand file tree Collapse file tree 3 files changed +4
-4
lines changed
crypto/src/main/java/org/apache/tuweni/v2/crypto
devp2p/src/main/kotlin/org/apache/tuweni Expand file tree Collapse file tree 3 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -104,7 +104,7 @@ public static byte[] sha2_256(byte[] input) {
104104 try {
105105 SHA256Hash .Hash result = SHA256Hash .hash (shaInput );
106106 try {
107- return SHA256Hash . hash ( shaInput ) .bytesArray ();
107+ return result .bytesArray ();
108108 } finally {
109109 result .destroy ();
110110 }
@@ -131,7 +131,7 @@ public static Bytes sha2_256(Bytes input) {
131131 try {
132132 SHA256Hash .Hash result = SHA256Hash .hash (shaInput );
133133 try {
134- return SHA256Hash . hash ( shaInput ) .bytes ();
134+ return result .bytes ();
135135 } finally {
136136 result .destroy ();
137137 }
Original file line number Diff line number Diff line change @@ -398,7 +398,7 @@ internal class ENRRequestPacket private constructor(
398398 fun create (keyPair : SECP256K1 .KeyPair , now : Long ): Packet {
399399 val expiration = expirationFor(now)
400400 val sigHash = createSignature(
401- PacketType .ENRRESPONSE ,
401+ PacketType .ENRREQUEST ,
402402 keyPair,
403403 ) { writer ->
404404 encodeTo(writer, expiration)
Original file line number Diff line number Diff line change @@ -397,7 +397,7 @@ internal class ENRRequestPacket private constructor(
397397 fun create (keyPair : SECP256K1 .KeyPair , now : Long ): Packet {
398398 val expiration = expirationFor(now)
399399 val sigHash = createSignature(
400- PacketType .ENRRESPONSE ,
400+ PacketType .ENRREQUEST ,
401401 keyPair,
402402 ) { writer ->
403403 encodeTo(writer, expiration)
You can’t perform that action at this time.
0 commit comments