From a41abafe97653258271f6a906f7a925cc592939e Mon Sep 17 00:00:00 2001 From: Matthias <5011972+fasmat@users.noreply.github.com> Date: Tue, 30 Apr 2024 12:56:18 +0000 Subject: [PATCH] Avoid conversion --- malfeasance/handler.go | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/malfeasance/handler.go b/malfeasance/handler.go index 724dfe7a..23421773 100644 --- a/malfeasance/handler.go +++ b/malfeasance/handler.go @@ -10,7 +10,6 @@ import ( "github.com/spacemeshos/post/shared" "github.com/spacemeshos/post/verifying" - awire "github.com/spacemeshos/go-spacemesh/activation/wire" "github.com/spacemeshos/go-spacemesh/codec" "github.com/spacemeshos/go-spacemesh/common/types" "github.com/spacemeshos/go-spacemesh/datastore" @@ -438,10 +437,8 @@ func validateInvalidPrevATX( if !edVerifier.Verify(signing.ATX, atx2.SmesherID, atx2.SignedBytes(), atx2.Signature) { return types.EmptyNodeID, errors.New("atx2: invalid signature") } - idATX1 := awire.ActivationTxFromWireV1(&proof.Atx1) - idATX2 := awire.ActivationTxFromWireV1(&proof.Atx2) - if idATX1.ID() == idATX2.ID() { + if atx1.ID() == atx2.ID() { numInvalidProofsPrevATX.Inc() return types.EmptyNodeID, errors.New("invalid old prev ATX malfeasance proof: ATX IDs are the same") }