Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: remove go-tss imports from observer/types #2799

Merged
merged 1 commit into from
Sep 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion x/observer/client/cli/tx_vote_blame.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ func CmdVoteBlame() *cobra.Command {
if err != nil {
return err
}
blameNodes := types.ConvertNodes(nodes)
blameNodes := ConvertNodes(nodes)
blameInfo := types.Blame{
Index: index,
FailureReason: failureReason,
Expand Down
19 changes: 19 additions & 0 deletions x/observer/client/cli/utils.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
package cli

import (
"gitlab.com/thorchain/tss/go-tss/blame"

"github.com/zeta-chain/node/x/observer/types"
)

func ConvertNodes(n []blame.Node) (nodes []*types.Node) {
for _, node := range n {
var entry types.Node
entry.PubKey = node.Pubkey
entry.BlameSignature = node.BlameSignature
entry.BlameData = node.BlameData

nodes = append(nodes, &entry)
}
return
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package types_test
package cli

import (
"testing"
Expand Down Expand Up @@ -49,7 +49,7 @@ func TestConvertNodes(t *testing.T) {

for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
result := types.ConvertNodes(tt.input)
result := ConvertNodes(tt.input)
require.Equal(t, tt.expected, result)
})
}
Expand Down
15 changes: 0 additions & 15 deletions x/observer/types/utils.go

This file was deleted.

3 changes: 2 additions & 1 deletion zetaclient/zetacore/client_vote.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import (
"github.com/zeta-chain/node/pkg/proofs"
"github.com/zeta-chain/node/pkg/retry"
"github.com/zeta-chain/node/x/crosschain/types"
observerclient "github.com/zeta-chain/node/x/observer/client/cli"
observertypes "github.com/zeta-chain/node/x/observer/types"
zctx "github.com/zeta-chain/node/zetaclient/context"
)
Expand Down Expand Up @@ -109,7 +110,7 @@ func (c *Client) PostVoteBlameData(
zetaBlame := observertypes.Blame{
Index: index,
FailureReason: blame.FailReason,
Nodes: observertypes.ConvertNodes(blame.BlameNodes),
Nodes: observerclient.ConvertNodes(blame.BlameNodes),
}
msg := observertypes.NewMsgVoteBlameMsg(signerAddress, chainID, zetaBlame)

Expand Down
Loading