Skip to content
This repository has been archived by the owner on May 23, 2024. It is now read-only.

Commit

Permalink
Avoid conversion
Browse files Browse the repository at this point in the history
  • Loading branch information
fasmat committed Apr 30, 2024
1 parent e244e80 commit a41abaf
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions malfeasance/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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")
}
Expand Down

0 comments on commit a41abaf

Please sign in to comment.