diff --git a/app/app.go b/app/app.go index ca045c2a13..0a7d688a05 100644 --- a/app/app.go +++ b/app/app.go @@ -129,7 +129,6 @@ import ( piohandlers "github.com/provenance-io/provenance/internal/handlers" "github.com/provenance-io/provenance/internal/pioconfig" "github.com/provenance-io/provenance/internal/provwasm" - "github.com/provenance-io/provenance/internal/statesync" "github.com/provenance-io/provenance/x/attribute" attributekeeper "github.com/provenance-io/provenance/x/attribute/keeper" attributetypes "github.com/provenance-io/provenance/x/attribute/types" @@ -402,9 +401,6 @@ func New( os.Exit(1) } - // Register helpers for state-sync status. - statesync.RegisterSyncStatus() - app.ParamsKeeper = initParamsKeeper(appCodec, legacyAmino, keys[paramstypes.StoreKey], tkeys[paramstypes.TStoreKey]) // set the BaseApp's parameter store diff --git a/internal/statesync/statesync.go b/internal/statesync/statesync.go deleted file mode 100644 index 82fb85c31a..0000000000 --- a/internal/statesync/statesync.go +++ /dev/null @@ -1,38 +0,0 @@ -package statesync - -import ( - cmtrpccore "github.com/cometbft/cometbft/rpc/core" - server "github.com/cometbft/cometbft/rpc/jsonrpc/server" - cmtrpctypes "github.com/cometbft/cometbft/rpc/jsonrpc/types" - - "github.com/cosmos/cosmos-sdk/version" -) - -type ProvenanceEnvironment struct { - cmtrpccore.Environment -} - -func RegisterSyncStatus(env cmtrpccore.Environment) { - routes := env.GetRoutes() - routes["sync_info"] = server.NewRPCFunc(env.Header, "height") -} - -func (env *ProvenanceEnvironment) GetSyncInfoAtBlock(ctx *cmtrpctypes.Context, height *int64) (*GetSyncInfo, error) { - block, err := env.Block(ctx, height) - if err != nil { - return nil, err - } - versionInfo := version.NewInfo() - si := &GetSyncInfo{ - BlockHeight: block.Block.Header.Height, - BlockHash: block.Block.Header.Hash().String(), - Version: versionInfo.Version, - } - return si, nil -} - -type GetSyncInfo struct { - BlockHeight int64 `json:"block_height"` - BlockHash string `json:"block_hash"` - Version string `json:"version"` -}