feat(log): remove core dependency and update core interface to be dependency free (backport #21045) (#21089)
Co-authored-by: Aaron Craelius <aaronc@users.noreply.github.com> Co-authored-by: Julien Robert <julien@rbrt.fr>
This commit is contained in:
co-authored by
Aaron Craelius
Julien Robert
parent
6bd057bd09
commit
fcb808a54c
+2
-3
@@ -18,9 +18,8 @@ import (
|
||||
"google.golang.org/protobuf/reflect/protoreflect"
|
||||
|
||||
"cosmossdk.io/core/header"
|
||||
"cosmossdk.io/core/log"
|
||||
errorsmod "cosmossdk.io/errors"
|
||||
sdklog "cosmossdk.io/log"
|
||||
"cosmossdk.io/log"
|
||||
"cosmossdk.io/store"
|
||||
storemetrics "cosmossdk.io/store/metrics"
|
||||
"cosmossdk.io/store/snapshots"
|
||||
@@ -198,7 +197,7 @@ func NewBaseApp(
|
||||
logger: logger.With(log.ModuleKey, "baseapp"),
|
||||
name: name,
|
||||
db: db,
|
||||
cms: store.NewCommitMultiStore(db, sdklog.LogWrapper{Logger: logger}, storemetrics.NewNoOpMetrics()), // by default we use a no-op metric gather in store
|
||||
cms: store.NewCommitMultiStore(db, logger, storemetrics.NewNoOpMetrics()), // by default we use a no-op metric gather in store
|
||||
storeLoader: DefaultStoreLoader,
|
||||
grpcQueryRouter: NewGRPCQueryRouter(),
|
||||
msgServiceRouter: NewMsgServiceRouter(),
|
||||
|
||||
@@ -10,7 +10,7 @@ import (
|
||||
|
||||
abci "github.com/cometbft/cometbft/api/cometbft/abci/v1"
|
||||
|
||||
"cosmossdk.io/core/log"
|
||||
"cosmossdk.io/log"
|
||||
)
|
||||
|
||||
// FinalizeBlockFunc is the function that is called by the OE to finalize the
|
||||
|
||||
@@ -8,7 +8,7 @@ import (
|
||||
abci "github.com/cometbft/cometbft/api/cometbft/abci/v1"
|
||||
"github.com/stretchr/testify/assert"
|
||||
|
||||
coretesting "cosmossdk.io/core/testing"
|
||||
"cosmossdk.io/log"
|
||||
)
|
||||
|
||||
func testFinalizeBlock(_ context.Context, _ *abci.FinalizeBlockRequest) (*abci.FinalizeBlockResponse, error) {
|
||||
@@ -16,7 +16,7 @@ func testFinalizeBlock(_ context.Context, _ *abci.FinalizeBlockRequest) (*abci.F
|
||||
}
|
||||
|
||||
func TestOptimisticExecution(t *testing.T) {
|
||||
oe := NewOptimisticExecution(coretesting.NewNopLogger(), testFinalizeBlock)
|
||||
oe := NewOptimisticExecution(log.NewNopLogger(), testFinalizeBlock)
|
||||
assert.True(t, oe.Enabled())
|
||||
oe.Execute(&abci.ProcessProposalRequest{
|
||||
Hash: []byte("test"),
|
||||
|
||||
Reference in New Issue
Block a user