Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Message validation optimization #6462

Merged
merged 47 commits into from
Oct 4, 2024
Merged
Show file tree
Hide file tree
Changes from 10 commits
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
10afdba
initial commit.
cristure Sep 12, 2024
aaa9d4b
added test for processing message.
cristure Sep 13, 2024
603bd69
added message validation cache.
cristure Sep 16, 2024
57f009e
fix some tests.
cristure Sep 16, 2024
f5a6f2e
fixed missing topic.
cristure Sep 16, 2024
8eec330
fix some more tests.
cristure Sep 17, 2024
a733097
fix nil pointer dereferences in tests.
cristure Sep 17, 2024
bab3b05
more tests fixed.
cristure Sep 17, 2024
c3f7120
add map for cacher in more unit tests.
cristure Sep 17, 2024
b62e37b
fix nil map for more tests.
cristure Sep 17, 2024
c00f8ee
fix process tests.
cristure Sep 17, 2024
94a64c1
Merge branch 'feat/equivalent-messages' into message_validation_optim…
cristure Sep 17, 2024
d77e367
Merge remote-tracking branch 'origin/feat/equivalent-messages' into m…
cristure Sep 18, 2024
d59c5bd
fix conflicts with target branch.
cristure Sep 18, 2024
396cd8e
refactored message validation to a different component.
cristure Sep 19, 2024
a44129f
cosmetic changes.
cristure Sep 20, 2024
afdceb1
added intercepted data verifier stub in multi data tests.
cristure Sep 20, 2024
d8d8113
fix single data interceptor tests.
cristure Sep 20, 2024
fe2082c
commit debug strings for CI.
cristure Sep 20, 2024
c6b7a0f
moved map of cachers in node processor.
cristure Sep 20, 2024
f59fc85
cosmetic changes.
cristure Sep 20, 2024
d00c7ab
fix integration tests.
cristure Sep 20, 2024
f21e24f
fix some more tests.
cristure Sep 20, 2024
f40d222
fix some unit tests.
cristure Sep 23, 2024
3a327c4
fix nil map in tests.
cristure Sep 23, 2024
a756a1f
Merge branch 'feat/equivalent-messages' into message_validation_optim…
cristure Sep 23, 2024
ff8eaa9
Merge remote-tracking branch 'origin/feat/equivalent-messages' into m…
cristure Sep 25, 2024
cde6c80
cosmetic changes.
cristure Sep 25, 2024
e0cf24b
Merge remote-tracking branch 'origin/message_validation_optimization'…
cristure Sep 25, 2024
9504263
refactored map of caches for intercepted data into a new component.
cristure Sep 25, 2024
b622085
added mock for interceptedDataVerifierFactory and injected into tests.
cristure Sep 26, 2024
f0b34ef
more test fixes.
cristure Sep 26, 2024
b05c650
increase wait time for CI run.
cristure Sep 26, 2024
5dc6bba
bring back rw mutex on interceptedDataVerifier.
cristure Sep 26, 2024
d214027
fixes after review.
cristure Sep 30, 2024
899b04d
split test and improved lock mechanism.
cristure Oct 1, 2024
959e037
Update node/nodeRunner.go
cristure Oct 2, 2024
7762f62
addressed some comments.
cristure Oct 2, 2024
23dbb5a
more fixes.
cristure Oct 3, 2024
b9eb2a5
fix unit tests.
cristure Oct 3, 2024
0deeb37
Merge branch 'feat/equivalent-messages' into message_validation_optim…
sstanculeanu Oct 3, 2024
8451f62
added close to intercepted data cacher and a few unit tests on nil ch…
cristure Oct 3, 2024
130e115
Merge remote-tracking branch 'origin/message_validation_optimization'…
cristure Oct 3, 2024
754fae3
Merge branch 'feat/equivalent-messages' into message_validation_optim…
sstanculeanu Oct 3, 2024
8dd18b8
cosmetic changes.
cristure Oct 3, 2024
1b11cb8
Merge remote-tracking branch 'origin/message_validation_optimization'…
cristure Oct 3, 2024
111fdb1
Merge branch 'feat/equivalent-messages' into message_validation_optim…
AdoAdoAdo Oct 4, 2024
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
12 changes: 4 additions & 8 deletions epochStart/bootstrap/process_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -252,11 +252,9 @@ func createMockEpochStartBootstrapArgs(
FlagsConfig: config.ContextFlagsConfig{
ForceStartFromNetwork: false,
},
TrieSyncStatisticsProvider: &testscommon.SizeSyncStatisticsHandlerStub{},
StateStatsHandler: disabledStatistics.NewStateStatistics(),
InterceptedDataVerifierFactory: &processMock.InterceptedDataVerifierFactoryStub{CreateCalled: func(topic string) (process.InterceptedDataVerifier, error) {
return &processMock.InterceptedDataVerifierStub{}, nil
}},
TrieSyncStatisticsProvider: &testscommon.SizeSyncStatisticsHandlerStub{},
StateStatsHandler: disabledStatistics.NewStateStatistics(),
InterceptedDataVerifierFactory: &processMock.InterceptedDataVerifierFactoryMock{},
}
}

Expand Down Expand Up @@ -998,9 +996,7 @@ func TestCreateSyncers(t *testing.T) {
epochStartProvider.whiteListerVerifiedTxs = &testscommon.WhiteListHandlerStub{}
epochStartProvider.requestHandler = &testscommon.RequestHandlerStub{}
epochStartProvider.storageService = &storageMocks.ChainStorerStub{}
epochStartProvider.interceptedDataVerifierFactory = &processMock.InterceptedDataVerifierFactoryStub{CreateCalled: func(topic string) (process.InterceptedDataVerifier, error) {
return &processMock.InterceptedDataVerifierStub{}, nil
}}
epochStartProvider.interceptedDataVerifierFactory = &processMock.InterceptedDataVerifierFactoryMock{}

err := epochStartProvider.createSyncers()
assert.Nil(t, err)
Expand Down
4 changes: 1 addition & 3 deletions epochStart/bootstrap/storageProcess_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -129,9 +129,7 @@ func TestStorageEpochStartBootstrap_BootstrapMetablockNotFound(t *testing.T) {
}
args.GeneralConfig = testscommon.GetGeneralConfig()
args.GeneralConfig.EpochStartConfig.RoundsPerEpoch = roundsPerEpoch
args.InterceptedDataVerifierFactory = &processMock.InterceptedDataVerifierFactoryStub{CreateCalled: func(topic string) (process.InterceptedDataVerifier, error) {
return &processMock.InterceptedDataVerifierStub{}, nil
}}
args.InterceptedDataVerifierFactory = &processMock.InterceptedDataVerifierFactoryMock{}
sesb, _ := NewStorageEpochStartBootstrap(args)

params, err := sesb.Bootstrap()
Expand Down
3 changes: 3 additions & 0 deletions epochStart/bootstrap/syncEpochStartMeta.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,9 @@ func NewEpochStartMetaSyncer(args ArgsNewEpochStartMetaSyncer) (*epochStartMetaS
if check.IfNil(args.MetaBlockProcessor) {
return nil, epochStart.ErrNilMetablockProcessor
}
if check.IfNil(args.InterceptedDataVerifierFactory) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

still missing test for this

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

added.

return nil, epochStart.ErrNilInterceptedDataVerifierFactory
}

e := &epochStartMetaSyncer{
requestHandler: args.RequestHandler,
Expand Down
15 changes: 9 additions & 6 deletions epochStart/bootstrap/syncEpochStartMeta_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ import (
"github.com/multiversx/mx-chain-go/epochStart"
"github.com/multiversx/mx-chain-go/epochStart/mock"
"github.com/multiversx/mx-chain-go/p2p"
"github.com/multiversx/mx-chain-go/process"
processMock "github.com/multiversx/mx-chain-go/process/mock"
"github.com/multiversx/mx-chain-go/testscommon"
"github.com/multiversx/mx-chain-go/testscommon/cryptoMocks"
Expand Down Expand Up @@ -51,6 +50,12 @@ func TestNewEpochStartMetaSyncer_NilsShouldError(t *testing.T) {
ess, err = NewEpochStartMetaSyncer(args)
assert.True(t, check.IfNil(ess))
assert.Equal(t, epochStart.ErrNilMetablockProcessor, err)

args = getEpochStartSyncerArgs()
args.InterceptedDataVerifierFactory = nil
ess, err = NewEpochStartMetaSyncer(args)
assert.True(t, check.IfNil(ess))
assert.Equal(t, epochStart.ErrNilInterceptedDataVerifierFactory, err)
}

func TestNewEpochStartMetaSyncer_ShouldWork(t *testing.T) {
Expand Down Expand Up @@ -163,10 +168,8 @@ func getEpochStartSyncerArgs() ArgsNewEpochStartMetaSyncer {
MinNumConnectedPeersToStart: 2,
MinNumOfPeersToConsiderBlockValid: 2,
},
HeaderIntegrityVerifier: &mock.HeaderIntegrityVerifierStub{},
MetaBlockProcessor: &mock.EpochStartMetaBlockProcessorStub{},
InterceptedDataVerifierFactory: &processMock.InterceptedDataVerifierFactoryStub{CreateCalled: func(topic string) (process.InterceptedDataVerifier, error) {
return &processMock.InterceptedDataVerifierStub{}, nil
}},
HeaderIntegrityVerifier: &mock.HeaderIntegrityVerifierStub{},
MetaBlockProcessor: &mock.EpochStartMetaBlockProcessorStub{},
InterceptedDataVerifierFactory: &processMock.InterceptedDataVerifierFactoryMock{},
}
}
3 changes: 3 additions & 0 deletions epochStart/errors.go
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,9 @@ var ErrNilEpochNotifier = errors.New("nil EpochNotifier")
// ErrNilMetablockProcessor signals that a nil metablock processor was provided
var ErrNilMetablockProcessor = errors.New("nil metablock processor")

// ErrNilInterceptedDataVerifierFactory signals that a nil intercepted data verifier factory was provided
var ErrNilInterceptedDataVerifierFactory = errors.New("nil intercepted data verifier factory")

// ErrCouldNotInitDelegationSystemSC signals that delegation system sc init failed
var ErrCouldNotInitDelegationSystemSC = errors.New("could not init delegation system sc")

Expand Down
15 changes: 12 additions & 3 deletions factory/processing/processComponents.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ import (
"github.com/multiversx/mx-chain-go/process/factory/interceptorscontainer"
"github.com/multiversx/mx-chain-go/process/headerCheck"
"github.com/multiversx/mx-chain-go/process/heartbeat/validator"
interceptorFactory "github.com/multiversx/mx-chain-go/process/interceptors/factory"
"github.com/multiversx/mx-chain-go/process/peer"
"github.com/multiversx/mx-chain-go/process/receipts"
"github.com/multiversx/mx-chain-go/process/smartContract"
Expand Down Expand Up @@ -133,6 +134,7 @@ type processComponents struct {
receiptsRepository mainFactory.ReceiptsRepository
sentSignaturesTracker process.SentSignaturesTracker
epochSystemSCProcessor process.EpochStartSystemSCProcessor
interceptedDataVerifierFactory process.InterceptedDataVerifierFactory
}

// ProcessComponentsFactoryArgs holds the arguments needed to create a process components factory
Expand Down Expand Up @@ -168,8 +170,6 @@ type ProcessComponentsFactoryArgs struct {

GenesisNonce uint64
GenesisRound uint64

InterceptedDataVerifierFactory process.InterceptedDataVerifierFactory
}

type processComponentsFactory struct {
Expand Down Expand Up @@ -221,6 +221,11 @@ func NewProcessComponentsFactory(args ProcessComponentsFactoryArgs) (*processCom
return nil, err
}

interceptedDataVerifierFactory := interceptorFactory.NewInterceptedDataVerifierFactory(interceptorFactory.InterceptedDataVerifierFactoryArgs{
CacheSpan: time.Duration(args.Config.InterceptedDataVerifier.CacheSpanInSec) * time.Second,
CacheExpiry: time.Duration(args.Config.InterceptedDataVerifier.CacheExpiryInSec) * time.Second,
})

return &processComponentsFactory{
config: args.Config,
epochConfig: args.EpochConfig,
Expand Down Expand Up @@ -252,7 +257,7 @@ func NewProcessComponentsFactory(args ProcessComponentsFactoryArgs) (*processCom
genesisNonce: args.GenesisNonce,
genesisRound: args.GenesisRound,
roundConfig: args.RoundConfig,
interceptedDataVerifierFactory: args.InterceptedDataVerifierFactory,
interceptedDataVerifierFactory: interceptedDataVerifierFactory,
}, nil
}

Expand Down Expand Up @@ -769,6 +774,7 @@ func (pcf *processComponentsFactory) Create() (*processComponents, error) {
accountsParser: pcf.accountsParser,
receiptsRepository: receiptsRepository,
sentSignaturesTracker: sentSignaturesTracker,
interceptedDataVerifierFactory: pcf.interceptedDataVerifierFactory,
}, nil
}

Expand Down Expand Up @@ -2055,6 +2061,9 @@ func (pc *processComponents) Close() error {
if !check.IfNil(pc.txsSender) {
log.LogIfError(pc.txsSender.Close())
}
if !check.IfNil(pc.interceptedDataVerifierFactory) {
log.LogIfError(pc.interceptedDataVerifierFactory.Close())
}

return nil
}
Expand Down
6 changes: 0 additions & 6 deletions factory/processing/processComponents_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ import (
testsMocks "github.com/multiversx/mx-chain-go/integrationTests/mock"
"github.com/multiversx/mx-chain-go/p2p"
"github.com/multiversx/mx-chain-go/process"
processMocks "github.com/multiversx/mx-chain-go/process/mock"
"github.com/multiversx/mx-chain-go/sharding"
"github.com/multiversx/mx-chain-go/sharding/nodesCoordinator"
"github.com/multiversx/mx-chain-go/state"
Expand Down Expand Up @@ -267,11 +266,6 @@ func createMockProcessComponentsFactoryArgs() processComp.ProcessComponentsFacto
}

args.State = components.GetStateComponents(args.CoreData, args.StatusCoreComponents)
args.InterceptedDataVerifierFactory = &processMocks.InterceptedDataVerifierFactoryStub{
CreateCalled: func(topic string) (process.InterceptedDataVerifier, error) {
return &processMocks.InterceptedDataVerifierStub{}, nil
},
}

return args
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import (

"github.com/multiversx/mx-chain-go/integrationTests/factory"
"github.com/multiversx/mx-chain-go/node"
"github.com/multiversx/mx-chain-go/process/mock"
"github.com/multiversx/mx-chain-go/testscommon/goroutines"
)

Expand Down Expand Up @@ -38,8 +37,7 @@ func TestBootstrapComponents_Create_Close_ShouldWork(t *testing.T) {
require.Nil(t, err)
managedNetworkComponents, err := nr.CreateManagedNetworkComponents(managedCoreComponents, managedStatusCoreComponents, managedCryptoComponents)
require.Nil(t, err)
interceptedDataVerifierFactory := &mock.InterceptedDataVerifierFactoryStub{}
managedBootstrapComponents, err := nr.CreateManagedBootstrapComponents(managedStatusCoreComponents, managedCoreComponents, managedCryptoComponents, managedNetworkComponents, interceptedDataVerifierFactory)
managedBootstrapComponents, err := nr.CreateManagedBootstrapComponents(managedStatusCoreComponents, managedCoreComponents, managedCryptoComponents, managedNetworkComponents)
require.Nil(t, err)
require.NotNil(t, managedBootstrapComponents)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@ import (
bootstrapComp "github.com/multiversx/mx-chain-go/factory/bootstrap"
"github.com/multiversx/mx-chain-go/integrationTests/factory"
"github.com/multiversx/mx-chain-go/node"
"github.com/multiversx/mx-chain-go/process"
"github.com/multiversx/mx-chain-go/process/mock"
"github.com/multiversx/mx-chain-go/testscommon/goroutines"
)

Expand Down Expand Up @@ -42,10 +40,7 @@ func TestConsensusComponents_Close_ShouldWork(t *testing.T) {
require.Nil(t, err)
managedNetworkComponents, err := nr.CreateManagedNetworkComponents(managedCoreComponents, managedStatusCoreComponents, managedCryptoComponents)
require.Nil(t, err)
interceptedDataVerifierFactory := &mock.InterceptedDataVerifierFactoryStub{CreateCalled: func(topic string) (process.InterceptedDataVerifier, error) {
return &mock.InterceptedDataVerifierStub{}, nil
}}
managedBootstrapComponents, err := nr.CreateManagedBootstrapComponents(managedStatusCoreComponents, managedCoreComponents, managedCryptoComponents, managedNetworkComponents, interceptedDataVerifierFactory)
managedBootstrapComponents, err := nr.CreateManagedBootstrapComponents(managedStatusCoreComponents, managedCoreComponents, managedCryptoComponents, managedNetworkComponents)
require.Nil(t, err)
managedDataComponents, err := nr.CreateManagedDataComponents(managedStatusCoreComponents, managedCoreComponents, managedBootstrapComponents, managedCryptoComponents)
require.Nil(t, err)
Expand Down Expand Up @@ -109,7 +104,6 @@ func TestConsensusComponents_Close_ShouldWork(t *testing.T) {
managedStatusCoreComponents,
gasScheduleNotifier,
nodesCoordinator,
interceptedDataVerifierFactory,
)
require.Nil(t, err)
time.Sleep(2 * time.Second)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import (

"github.com/multiversx/mx-chain-go/integrationTests/factory"
"github.com/multiversx/mx-chain-go/node"
"github.com/multiversx/mx-chain-go/process/mock"
"github.com/multiversx/mx-chain-go/testscommon/goroutines"
)

Expand Down Expand Up @@ -38,8 +37,8 @@ func TestDataComponents_Create_Close_ShouldWork(t *testing.T) {
require.Nil(t, err)
managedNetworkComponents, err := nr.CreateManagedNetworkComponents(managedCoreComponents, managedStatusCoreComponents, managedCryptoComponents)
require.Nil(t, err)
interceptedDataVerifierFactory := &mock.InterceptedDataVerifierFactoryStub{}
managedBootstrapComponents, err := nr.CreateManagedBootstrapComponents(managedStatusCoreComponents, managedCoreComponents, managedCryptoComponents, managedNetworkComponents, interceptedDataVerifierFactory)

managedBootstrapComponents, err := nr.CreateManagedBootstrapComponents(managedStatusCoreComponents, managedCoreComponents, managedCryptoComponents, managedNetworkComponents)
require.Nil(t, err)
managedDataComponents, err := nr.CreateManagedDataComponents(managedStatusCoreComponents, managedCoreComponents, managedBootstrapComponents, managedCryptoComponents)
require.Nil(t, err)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@ import (
bootstrapComp "github.com/multiversx/mx-chain-go/factory/bootstrap"
"github.com/multiversx/mx-chain-go/integrationTests/factory"
"github.com/multiversx/mx-chain-go/node"
"github.com/multiversx/mx-chain-go/process"
"github.com/multiversx/mx-chain-go/process/mock"
"github.com/multiversx/mx-chain-go/testscommon/goroutines"
)

Expand Down Expand Up @@ -42,10 +40,7 @@ func TestHeartbeatComponents_Close_ShouldWork(t *testing.T) {
require.Nil(t, err)
managedNetworkComponents, err := nr.CreateManagedNetworkComponents(managedCoreComponents, managedStatusCoreComponents, managedCryptoComponents)
require.Nil(t, err)
interceptedDataVerifierFactory := &mock.InterceptedDataVerifierFactoryStub{CreateCalled: func(topic string) (process.InterceptedDataVerifier, error) {
return &mock.InterceptedDataVerifierStub{}, nil
}}
managedBootstrapComponents, err := nr.CreateManagedBootstrapComponents(managedStatusCoreComponents, managedCoreComponents, managedCryptoComponents, managedNetworkComponents, interceptedDataVerifierFactory)
managedBootstrapComponents, err := nr.CreateManagedBootstrapComponents(managedStatusCoreComponents, managedCoreComponents, managedCryptoComponents, managedNetworkComponents)
require.Nil(t, err)
managedDataComponents, err := nr.CreateManagedDataComponents(managedStatusCoreComponents, managedCoreComponents, managedBootstrapComponents, managedCryptoComponents)
require.Nil(t, err)
Expand Down Expand Up @@ -109,7 +104,6 @@ func TestHeartbeatComponents_Close_ShouldWork(t *testing.T) {
managedStatusCoreComponents,
gasScheduleNotifier,
nodesCoordinator,
interceptedDataVerifierFactory,
)
require.Nil(t, err)
time.Sleep(2 * time.Second)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@ import (
bootstrapComp "github.com/multiversx/mx-chain-go/factory/bootstrap"
"github.com/multiversx/mx-chain-go/integrationTests/factory"
"github.com/multiversx/mx-chain-go/node"
"github.com/multiversx/mx-chain-go/process"
"github.com/multiversx/mx-chain-go/process/mock"
"github.com/multiversx/mx-chain-go/testscommon/goroutines"
)

Expand Down Expand Up @@ -43,10 +41,7 @@ func TestProcessComponents_Close_ShouldWork(t *testing.T) {
require.Nil(t, err)
managedNetworkComponents, err := nr.CreateManagedNetworkComponents(managedCoreComponents, managedStatusCoreComponents, managedCryptoComponents)
require.Nil(t, err)
interceptedDataVerifierFactory := &mock.InterceptedDataVerifierFactoryStub{CreateCalled: func(topic string) (process.InterceptedDataVerifier, error) {
return &mock.InterceptedDataVerifierStub{}, nil
}}
managedBootstrapComponents, err := nr.CreateManagedBootstrapComponents(managedStatusCoreComponents, managedCoreComponents, managedCryptoComponents, managedNetworkComponents, interceptedDataVerifierFactory)
managedBootstrapComponents, err := nr.CreateManagedBootstrapComponents(managedStatusCoreComponents, managedCoreComponents, managedCryptoComponents, managedNetworkComponents)
require.Nil(t, err)
managedDataComponents, err := nr.CreateManagedDataComponents(managedStatusCoreComponents, managedCoreComponents, managedBootstrapComponents, managedCryptoComponents)
require.Nil(t, err)
Expand Down Expand Up @@ -108,7 +103,6 @@ func TestProcessComponents_Close_ShouldWork(t *testing.T) {
managedStatusCoreComponents,
gasScheduleNotifier,
nodesCoordinator,
interceptedDataVerifierFactory,
)
require.Nil(t, err)
require.NotNil(t, managedProcessComponents)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import (

"github.com/multiversx/mx-chain-go/integrationTests/factory"
"github.com/multiversx/mx-chain-go/node"
"github.com/multiversx/mx-chain-go/process/mock"
"github.com/multiversx/mx-chain-go/testscommon/goroutines"
)

Expand Down Expand Up @@ -38,8 +37,7 @@ func TestStateComponents_Create_Close_ShouldWork(t *testing.T) {
require.Nil(t, err)
managedNetworkComponents, err := nr.CreateManagedNetworkComponents(managedCoreComponents, managedStatusCoreComponents, managedCryptoComponents)
require.Nil(t, err)
interceptedDataVerifierFactory := &mock.InterceptedDataVerifierFactoryStub{}
managedBootstrapComponents, err := nr.CreateManagedBootstrapComponents(managedStatusCoreComponents, managedCoreComponents, managedCryptoComponents, managedNetworkComponents, interceptedDataVerifierFactory)
managedBootstrapComponents, err := nr.CreateManagedBootstrapComponents(managedStatusCoreComponents, managedCoreComponents, managedCryptoComponents, managedNetworkComponents)
require.Nil(t, err)
managedDataComponents, err := nr.CreateManagedDataComponents(managedStatusCoreComponents, managedCoreComponents, managedBootstrapComponents, managedCryptoComponents)
require.Nil(t, err)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@ import (
bootstrapComp "github.com/multiversx/mx-chain-go/factory/bootstrap"
"github.com/multiversx/mx-chain-go/integrationTests/factory"
"github.com/multiversx/mx-chain-go/node"
"github.com/multiversx/mx-chain-go/process"
"github.com/multiversx/mx-chain-go/process/mock"
"github.com/multiversx/mx-chain-go/testscommon/goroutines"
)

Expand Down Expand Up @@ -43,10 +41,7 @@ func TestStatusComponents_Create_Close_ShouldWork(t *testing.T) {
require.Nil(t, err)
managedNetworkComponents, err := nr.CreateManagedNetworkComponents(managedCoreComponents, managedStatusCoreComponents, managedCryptoComponents)
require.Nil(t, err)
interceptedDataVerifierFactory := &mock.InterceptedDataVerifierFactoryStub{CreateCalled: func(topic string) (process.InterceptedDataVerifier, error) {
return &mock.InterceptedDataVerifierStub{}, nil
}}
managedBootstrapComponents, err := nr.CreateManagedBootstrapComponents(managedStatusCoreComponents, managedCoreComponents, managedCryptoComponents, managedNetworkComponents, interceptedDataVerifierFactory)
managedBootstrapComponents, err := nr.CreateManagedBootstrapComponents(managedStatusCoreComponents, managedCoreComponents, managedCryptoComponents, managedNetworkComponents)
require.Nil(t, err)
managedDataComponents, err := nr.CreateManagedDataComponents(managedStatusCoreComponents, managedCoreComponents, managedBootstrapComponents, managedCryptoComponents)
require.Nil(t, err)
Expand Down Expand Up @@ -110,7 +105,6 @@ func TestStatusComponents_Create_Close_ShouldWork(t *testing.T) {
managedStatusCoreComponents,
gasScheduleNotifier,
nodesCoordinator,
interceptedDataVerifierFactory,
)
require.Nil(t, err)
time.Sleep(2 * time.Second)
Expand Down
Loading
Loading