Skip to content

Commit 6d583c5

Browse files
committed
lint and build fixes
1 parent 17ecc6d commit 6d583c5

4 files changed

Lines changed: 3 additions & 19 deletions

File tree

node/node_test.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -459,6 +459,7 @@ func TestNodeNewNodeCustomReactors(t *testing.T) {
459459
cfg.DefaultDBProvider,
460460
DefaultMetricsProvider(config.Instrumentation),
461461
log.TestingLogger(),
462+
true,
462463
CustomReactors(map[string]p2p.Reactor{"FOO": cr, "BLOCKSYNC": customBlocksyncReactor}),
463464
)
464465
require.NoError(t, err)

state/store.go

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
11
package state
22

33
import (
4-
"bytes"
54
"encoding/binary"
65
"errors"
76
"fmt"
8-
"strconv"
97
"time"
108

119
"github.com/cosmos/gogoproto/proto"
@@ -33,7 +31,6 @@ const (
3331
var (
3432
ErrKeyNotFound = errors.New("key not found")
3533
ErrInvalidHeightValue = errors.New("invalid height value")
36-
abciResponsesPrefix = []byte("abciResponsesKey:")
3734
)
3835

3936
//------------------------------------------------------------------------
@@ -50,22 +47,6 @@ func calcABCIResponsesKey(height int64) []byte {
5047
return []byte(fmt.Sprintf("abciResponsesKey:%v", height))
5148
}
5249

53-
// parseABCIResponsesKey checks if key has the prefix and returns (ok, height).
54-
func parseABCIResponsesKey(key []byte) (bool, int64) {
55-
if !bytes.HasPrefix(key, abciResponsesPrefix) {
56-
return false, 0
57-
}
58-
// Extract the suffix part (height as bytes)
59-
suffix := key[len(abciResponsesPrefix):]
60-
61-
// Parse it as int64
62-
height, err := strconv.ParseInt(string(suffix), 10, 64)
63-
if err != nil {
64-
return false, 0
65-
}
66-
return true, height
67-
}
68-
6950
// ----------------------
7051
var (
7152
lastABCIResponseKey = []byte("lastABCIResponseKey")

state/store_test.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -479,6 +479,7 @@ func TestFinalizeBlockResponsePruning(t *testing.T) {
479479
sm.WithPrunerObserver(obs),
480480
sm.WithPrunerCompanionEnabled(),
481481
)
482+
pruner.DisableWaitAtStart()
482483

483484
// Check that we have written a finalize block result at height 'height - 1'
484485
_, err = stateStore.LoadFinalizeBlockResponse(height - 1)

test/e2e/node/main.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,7 @@ func startNode(cfg *Config) error {
140140
config.DefaultDBProvider,
141141
node.DefaultMetricsProvider(cmtcfg.Instrumentation),
142142
nodeLogger,
143+
false,
143144
)
144145
if err != nil {
145146
return err

0 commit comments

Comments
 (0)