Skip to content
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
3 changes: 1 addition & 2 deletions common/ledger/blkstorage/blockfile_helper.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ import (
"strconv"
"strings"

"github.com/davecgh/go-spew/spew"
"github.com/hyperledger/fabric-protos-go-apiv2/common"
"github.com/pkg/errors"
"google.golang.org/protobuf/proto"
Expand Down Expand Up @@ -81,7 +80,7 @@ func constructBlockfilesInfo(rootDir string) (*blockfilesInfo, error) {
latestFileNumber: lastFileNum,
noBlockFiles: lastFileNum == 0 && numBlocksInFile == 0,
}
logger.Debugf("blockfilesInfo constructed from file system = %s", spew.Sdump(blkfilesInfo))
logger.Debugf("blockfilesInfo constructed from file system = %v", blkfilesInfo)
return blkfilesInfo, nil
}

Expand Down
5 changes: 2 additions & 3 deletions common/ledger/blkstorage/blockfile_mgr.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ import (
"sync"
"sync/atomic"

"github.com/davecgh/go-spew/spew"
"github.com/hyperledger/fabric-protos-go-apiv2/common"
"github.com/hyperledger/fabric-protos-go-apiv2/peer"
"github.com/pkg/errors"
Expand Down Expand Up @@ -111,7 +110,7 @@ func newBlockfileMgr(id string, conf *Conf, indexConfig *IndexConfig, indexStore
if blockfilesInfo, err = constructBlockfilesInfo(rootDir); err != nil {
panic(fmt.Sprintf("Could not build blockfilesInfo info from block files: %s", err))
}
logger.Debugf("Info constructed by scanning the blocks dir = %s", spew.Sdump(blockfilesInfo))
logger.Debugf("Info constructed by scanning the blocks dir = %v", blockfilesInfo)
} else {
logger.Debug(`Syncing block information from block storage (if needed)`)
syncBlockfilesInfoFromFS(rootDir, blockfilesInfo)
Expand Down Expand Up @@ -637,7 +636,7 @@ func (mgr *blockfileMgr) retrieveTransactionByID(txID string) (*common.Envelope,
return mgr.fetchTransactionEnvelope(loc)
}

func (mgr *blockfileMgr) retrieveTransactionByBlockNumTranNum(blockNum uint64, tranNum uint64) (*common.Envelope, error) {
func (mgr *blockfileMgr) retrieveTransactionByBlockNumTranNum(blockNum, tranNum uint64) (*common.Envelope, error) {
logger.Debugf("retrieveTransactionByBlockNumTranNum() - blockNum = [%d], tranNum = [%d]", blockNum, tranNum)
if blockNum < mgr.firstPossibleBlockNumberInBlockFiles() {
return nil, errors.Errorf(
Expand Down
3 changes: 1 addition & 2 deletions common/ledger/blkstorage/reset_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import (
"path"
"testing"

"github.com/davecgh/go-spew/spew"
"github.com/hyperledger/fabric-protos-go-apiv2/common"
"github.com/stretchr/testify/require"
"google.golang.org/protobuf/encoding/protowire"
Expand Down Expand Up @@ -221,7 +220,7 @@ func assertBlocksDirOnlyFileWithGenesisBlock(t *testing.T, ledgerDir string, gen

func assertBlockStorePostReset(t *testing.T, store *BlockStore, originallyCommittedBlocks []*common.Block) {
bcInfo, _ := store.GetBlockchainInfo()
t.Logf("bcInfo = %s", spew.Sdump(bcInfo))
t.Logf("bcInfo = %v", bcInfo)
require.True(t, proto.Equal(
&common.BlockchainInfo{
Height: 1,
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ require (
github.com/Knetic/govaluate v3.0.1-0.20171022003610-9aa49832a739+incompatible
github.com/alecthomas/kingpin/v2 v2.4.0
github.com/cockroachdb/errors v1.12.0
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc
github.com/go-viper/mapstructure/v2 v2.5.0
github.com/gorilla/handlers v1.5.1
github.com/gorilla/mux v1.8.0
Expand Down Expand Up @@ -56,6 +55,7 @@ require (
github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b // indirect
github.com/cockroachdb/redact v1.1.5 // indirect
github.com/consensys/gnark-crypto v0.20.1 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/dnephin/pflag v1.0.7 // indirect
github.com/fatih/color v1.18.0 // indirect
github.com/felixge/httpsnoop v1.0.4 // indirect
Expand Down
3 changes: 1 addition & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,8 @@ github.com/consensys/gnark-crypto v0.20.1 h1:PXDUBvk8AzhvWowHLWBEAfUQcV1/aZgWIqD
github.com/consensys/gnark-crypto v0.20.1/go.mod h1:RBWrSgy+IDbGR69RRV313th3M/aZU1ubk2om+qHuTSc=
github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM=
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/dnephin/pflag v1.0.7 h1:oxONGlWxhmUct0YzKTgrpQv9AUA1wtPBn7zuSjJqptk=
github.com/dnephin/pflag v1.0.7/go.mod h1:uxE91IoWURlOiTUIA8Mq5ZZkAv3dPUfZNaT80Zm7OQE=
github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4=
Expand Down
Loading