refactor: bring cometbft back to v0.38.x family (#25285)

This commit is contained in:
Alex | Interchain Labs
2025-08-29 15:58:04 -04:00
committed by GitHub
parent a37940077e
commit 727faf0484
446 changed files with 15286 additions and 103152 deletions
+4 -12
View File
@@ -1,9 +1,9 @@
package mock
import (
cmtproto "github.com/cometbft/cometbft/api/cometbft/types/v2"
"github.com/cometbft/cometbft/v2/crypto"
cmttypes "github.com/cometbft/cometbft/v2/types"
"github.com/cometbft/cometbft/crypto"
cmtproto "github.com/cometbft/cometbft/proto/tendermint/types"
cmttypes "github.com/cometbft/cometbft/types"
cryptocodec "github.com/cosmos/cosmos-sdk/crypto/codec"
"github.com/cosmos/cosmos-sdk/crypto/keys/ed25519"
@@ -28,21 +28,13 @@ func (pv PV) GetPubKey() (crypto.PubKey, error) {
}
// SignVote implements PrivValidator interface
func (pv PV) SignVote(chainID string, vote *cmtproto.Vote, signExtension bool) error {
func (pv PV) SignVote(chainID string, vote *cmtproto.Vote) error {
signBytes := cmttypes.VoteSignBytes(chainID, vote)
sig, err := pv.PrivKey.Sign(signBytes)
if err != nil {
return err
}
vote.Signature = sig
if signExtension {
extSignBytes, _ := cmttypes.VoteExtensionSignBytes(chainID, vote)
extSig, err := pv.PrivKey.Sign(extSignBytes)
if err != nil {
return err
}
vote.ExtensionSignature = extSig
}
return nil
}
+2 -2
View File
@@ -3,7 +3,7 @@ package mock
import (
"testing"
cmtproto "github.com/cometbft/cometbft/api/cometbft/types/v2"
cmtproto "github.com/cometbft/cometbft/proto/tendermint/types"
"github.com/stretchr/testify/require"
)
@@ -17,7 +17,7 @@ func TestGetPubKey(t *testing.T) {
func TestSignVote(t *testing.T) {
pv := NewPV()
v := cmtproto.Vote{}
err := pv.SignVote("chain-id", &v, false)
err := pv.SignVote("chain-id", &v)
require.NoError(t, err)
require.NotNil(t, v.Signature)
}
+1 -1
View File
@@ -15,7 +15,7 @@ import (
reflect "reflect"
appmodule "cosmossdk.io/core/appmodule"
types "github.com/cometbft/cometbft/v2/abci/types"
types "github.com/cometbft/cometbft/abci/types"
client "github.com/cosmos/cosmos-sdk/client"
codec "github.com/cosmos/cosmos-sdk/codec"
types0 "github.com/cosmos/cosmos-sdk/codec/types"
+1 -1
View File
@@ -14,7 +14,7 @@ import (
json "encoding/json"
reflect "reflect"
types "github.com/cometbft/cometbft/v2/abci/types"
types "github.com/cometbft/cometbft/abci/types"
client "github.com/cosmos/cosmos-sdk/client"
codec "github.com/cosmos/cosmos-sdk/codec"
types0 "github.com/cosmos/cosmos-sdk/codec/types"