Skip to content

Commit

Permalink
build: update greenfield chain dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
will-2012 committed May 26, 2023
1 parent 6663a28 commit 6d15d5f
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 8 deletions.
2 changes: 1 addition & 1 deletion base/gfspapp/gfsp_mdmgr.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ type Option func(app *GfSpBaseApp, cfg *gfspconfig.GfSpConfig) error
// NewModularFunc defines the module new instance func type.
type NewModularFunc = func(app *GfSpBaseApp, cfg *gfspconfig.GfSpConfig) (coremodule.Modular, error)

// ModularManager manages the modulus, record the module info, module info include:
// ModularManager manages the modules, record the module info, module info include:
// module name, module description and new module func. Module name is an indexer for
// starting, the start module name comes from config file or '--service' command flag.
// Module description uses for 'list' command that shows the SP supports modules info.
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ go 1.20
replace (
cosmossdk.io/api => github.com/bnb-chain/greenfield-cosmos-sdk/api v0.0.0-20230425074444-eb5869b05fe9
cosmossdk.io/math => github.com/bnb-chain/greenfield-cosmos-sdk/math v0.0.0-20230425074444-eb5869b05fe9
github.com/bnb-chain/greenfield => github.com/bnb-chain/greenfield v0.2.0
github.com/bnb-chain/greenfield => github.com/bnb-chain/greenfield v0.2.1-alpha.1
github.com/btcsuite/btcd => github.com/btcsuite/btcd v0.23.0
github.com/cometbft/cometbft => github.com/bnb-chain/greenfield-cometbft v0.0.1
github.com/confio/ics23/go => github.com/cosmos/cosmos-sdk/ics23/go v0.8.0
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -163,8 +163,8 @@ github.com/bgentry/speakeasy v0.1.1-0.20220910012023-760eaf8b6816/go.mod h1:+zsy
github.com/bits-and-blooms/bitset v1.2.0 h1:Kn4yilvwNtMACtf1eYDlG8H77R07mZSPbMjLyS07ChA=
github.com/bits-and-blooms/bitset v1.2.0/go.mod h1:gIdJ4wp64HaoK2YrL1Q5/N7Y16edYb8uY+O0FJTyyDA=
github.com/bmizerany/pat v0.0.0-20170815010413-6226ea591a40/go.mod h1:8rLXio+WjiTceGBHIoTvn60HIbs7Hm7bcHjyrSqYB9c=
github.com/bnb-chain/greenfield v0.2.0 h1:P31k1mUYiXmtfYLzEidVYS/4BLqoTl9QnpWXd4JqHZM=
github.com/bnb-chain/greenfield v0.2.0/go.mod h1:JudGigAvhG6lcEh8/U5a3bU4VunrrPdei/KJ6DDrPfQ=
github.com/bnb-chain/greenfield v0.2.1-alpha.1 h1:0WASaBcUy/thiwu28m6i3vh8klOgaX7vPHD2bLZsBcI=
github.com/bnb-chain/greenfield v0.2.1-alpha.1/go.mod h1:FK+Vg+IfLYlA+o9q81qrLufQaQKm4Vz9G0/u4fG7bO8=
github.com/bnb-chain/greenfield-cometbft v0.0.1 h1:pX8S9oZKjWJCrxH07l6rbU3zee9txZ11+UwO9stsNMQ=
github.com/bnb-chain/greenfield-cometbft v0.0.1/go.mod h1:9q11eHNRY9FDwFH+4pompzPNGv//Z3VcfvkELaHJPMs=
github.com/bnb-chain/greenfield-common/go v0.0.0-20230512062756-5d7790d0ccbf h1:5HxLNqgYHNV7Cfaepws3vejeI49aWry7ON2k+a23K10=
Expand Down
4 changes: 2 additions & 2 deletions modular/blocksyncer/blocksyncer_indexer.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ func (i *Impl) HandleEvent(ctx context.Context, block *coretypes.ResultBlock, tx
// Process fetches a block for a given height and associated metadata and export it to a database.
// It returns an error if any export process fails.
func (i *Impl) Process(height uint64) error {
log.Debugw("processing block", "height", height)
// log.Debugw("processing block", "height", height)
var block *coretypes.ResultBlock
var events *coretypes.ResultBlockResults
var txs []*types.Tx
Expand Down Expand Up @@ -270,7 +270,7 @@ func (i *Impl) Processed(ctx context.Context, height uint64) (bool, error) {
if err != nil {
return false, err
}
log.Infof("epoch height:%d, cur height: %d", ep.BlockHeight, height)
// log.Infof("epoch height:%d, cur height: %d", ep.BlockHeight, height)
if ep.BlockHeight > int64(height) {
heightKey := fmt.Sprintf("%s-%d", i.GetServiceName(), height)
blockMap.Delete(heightKey)
Expand Down
4 changes: 2 additions & 2 deletions modular/blocksyncer/blocksyncer_options.go
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ func (b *BlockSyncerModular) enqueueNewBlocks(context context.Context, exportQue
select {
case <-context.Done():
log.Infof("Receive cancel signal, enqueueNewBlocks routine will stop")
//close channel
// close channel
close(exportQueue)
return
default:
Expand All @@ -205,7 +205,7 @@ func (b *BlockSyncerModular) enqueueNewBlocks(context context.Context, exportQue
latestBlockHeight := latestBlockHeightAny.(int64)
// Enqueue all heights from the current height up to the latest height
for ; currHeight <= uint64(latestBlockHeight); currHeight++ {
log.Debugw("enqueueing new block", "height", currHeight)
// log.Debugw("enqueueing new block", "height", currHeight)
exportQueue <- currHeight
}
time.Sleep(config.GetAvgBlockTime())
Expand Down
1 change: 1 addition & 0 deletions modular/executor/execute_replicate.go
Original file line number Diff line number Diff line change
Expand Up @@ -277,6 +277,7 @@ func (e *ExecuteModular) doneReplicatePiece(
approval.GetApprovedSpEndpoint(), approval, receive)
if err != nil {
log.CtxErrorw(ctx, "failed to done replicate piece",
"endpoint", approval.GetApprovedSpEndpoint(),
"replicate_idx", replicateIdx, "error", err)
return nil, nil, err
}
Expand Down

0 comments on commit 6d15d5f

Please sign in to comment.