Co-authored-by: Julien Robert <julien@rbrt.fr>
This commit is contained in:
co-authored by
Julien Robert
parent
e9aece088d
commit
2ad5ab913d
@@ -1343,7 +1343,6 @@ func TestABCI_GetBlockRetentionHeight(t *testing.T) {
|
||||
}
|
||||
|
||||
for name, tc := range testCases {
|
||||
tc := tc
|
||||
|
||||
tc.bapp.SetParamStore(¶mStore{db: coretesting.NewMemDB()})
|
||||
_, err := tc.bapp.InitChain(&abci.InitChainRequest{
|
||||
@@ -1835,7 +1834,7 @@ func TestABCI_PrepareProposal_VoteExtensions(t *testing.T) {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
cp := ctx.ConsensusParams() // nolint:staticcheck // ignore linting error
|
||||
cp := ctx.ConsensusParams() //nolint:staticcheck // ignore linting error
|
||||
extsEnabled := cp.Feature.VoteExtensionsEnableHeight != nil && req.Height >= cp.Feature.VoteExtensionsEnableHeight.Value && cp.Feature.VoteExtensionsEnableHeight.Value != 0
|
||||
if !extsEnabled {
|
||||
// check abci params
|
||||
|
||||
@@ -47,7 +47,7 @@ func ValidateVoteExtensions(
|
||||
extCommit abci.ExtendedCommitInfo,
|
||||
) error {
|
||||
// Get values from context
|
||||
cp := ctx.ConsensusParams() // nolint:staticcheck // ignore linting error
|
||||
cp := ctx.ConsensusParams() //nolint:staticcheck // ignore linting error
|
||||
currentHeight := ctx.HeaderInfo().Height
|
||||
chainID := ctx.HeaderInfo().ChainID
|
||||
commitInfo := ctx.CometInfo().LastCommit
|
||||
@@ -258,7 +258,7 @@ func (h *DefaultProposalHandler) SetTxSelector(ts TxSelector) {
|
||||
func (h *DefaultProposalHandler) PrepareProposalHandler() sdk.PrepareProposalHandler {
|
||||
return func(ctx sdk.Context, req *abci.PrepareProposalRequest) (*abci.PrepareProposalResponse, error) {
|
||||
var maxBlockGas uint64
|
||||
if b := ctx.ConsensusParams().Block; b != nil { // nolint:staticcheck // ignore linting error
|
||||
if b := ctx.ConsensusParams().Block; b != nil { //nolint:staticcheck // ignore linting error
|
||||
maxBlockGas = uint64(b.MaxGas)
|
||||
}
|
||||
|
||||
@@ -405,7 +405,7 @@ func (h *DefaultProposalHandler) ProcessProposalHandler() sdk.ProcessProposalHan
|
||||
var totalTxGas uint64
|
||||
|
||||
var maxBlockGas int64
|
||||
if b := ctx.ConsensusParams().Block; b != nil { // nolint:staticcheck // ignore linting error
|
||||
if b := ctx.ConsensusParams().Block; b != nil { //nolint:staticcheck // ignore linting error
|
||||
maxBlockGas = b.MaxGas
|
||||
}
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ import (
|
||||
"reflect"
|
||||
|
||||
gogoproto "github.com/cosmos/gogoproto/proto"
|
||||
"github.com/golang/protobuf/proto" // nolint: staticcheck // needed because gogoproto.Merge does not work consistently. See NOTE: comments.
|
||||
"github.com/golang/protobuf/proto" //nolint: staticcheck // needed because gogoproto.Merge does not work consistently. See NOTE: comments.
|
||||
"google.golang.org/grpc"
|
||||
proto2 "google.golang.org/protobuf/proto"
|
||||
"google.golang.org/protobuf/reflect/protoreflect"
|
||||
|
||||
@@ -245,7 +245,6 @@ func TestABCI_OfferSnapshot_Errors(t *testing.T) {
|
||||
}, abci.OFFER_SNAPSHOT_RESULT_REJECT},
|
||||
}
|
||||
for name, tc := range testCases {
|
||||
tc := tc
|
||||
t.Run(name, func(t *testing.T) {
|
||||
resp, err := suite.baseApp.OfferSnapshot(&abci.OfferSnapshotRequest{Snapshot: tc.snapshot})
|
||||
require.NoError(t, err)
|
||||
|
||||
Reference in New Issue
Block a user