diff --git a/config/protocol.unit_testnet.yml b/config/protocol.unit_testnet.yml index d2753f6e1c..5d3f80d0a8 100644 --- a/config/protocol.unit_testnet.yml +++ b/config/protocol.unit_testnet.yml @@ -18,7 +18,7 @@ ProtocolConfiguration: VerifyTransactions: true P2PSigExtensions: true Hardforks: - Aspidochelone: 25 +# Aspidochelone: 25 ApplicationConfiguration: SkipBlockVerification: false diff --git a/pkg/neotest/chain/chain.go b/pkg/neotest/chain/chain.go index ad5b0ecfb4..4f5f48494e 100644 --- a/pkg/neotest/chain/chain.go +++ b/pkg/neotest/chain/chain.go @@ -258,18 +258,13 @@ func NewMultiWithOptionsNoCheck(t testing.TB, options *Options) (*core.Blockchai options = &Options{} } - cfg := config.Blockchain{ - ProtocolConfiguration: config.ProtocolConfiguration{ - Magic: netmode.UnitTestNet, - MaxTraceableBlocks: MaxTraceableBlocks, - TimePerBlock: TimePerBlock, - StandbyCommittee: standByCommittee, - ValidatorsCount: 4, - VerifyTransactions: true, - }, + cfg, err := config.Load(config.DefaultConfigPath, netmode.UnitTestNet) + if err != nil { + return nil, nil, nil, err } + bcfg := cfg.Blockchain() if options.BlockchainConfigHook != nil { - options.BlockchainConfigHook(&cfg) + options.BlockchainConfigHook(&bcfg) } store := options.Store @@ -282,7 +277,7 @@ func NewMultiWithOptionsNoCheck(t testing.TB, options *Options) (*core.Blockchai logger = zaptest.NewLogger(t) } - bc, err := core.NewBlockchain(store, cfg, logger) + bc, err := core.NewBlockchain(store, bcfg, logger) if err == nil && !options.SkipRun { go bc.Run() t.Cleanup(bc.Close) diff --git a/pkg/services/rpcsrv/client_test.go b/pkg/services/rpcsrv/client_test.go index 9f24c7b53f..750a57f886 100644 --- a/pkg/services/rpcsrv/client_test.go +++ b/pkg/services/rpcsrv/client_test.go @@ -2447,8 +2447,11 @@ func TestClient_GetStorageHistoric(t *testing.T) { } func TestClient_GetVersion_Hardforks(t *testing.T) { - _, _, httpSrv := initServerWithInMemoryChain(t) - + _, _, httpSrv := initClearServerWithCustomConfig(t, func(cfg *config.Config) { + cfg.ProtocolConfiguration.Hardforks = map[string]uint32{ + "Aspidochelone": 25, + } + }) c, err := rpcclient.New(context.Background(), httpSrv.URL, rpcclient.Options{}) require.NoError(t, err) t.Cleanup(c.Close) diff --git a/pkg/services/rpcsrv/server_test.go b/pkg/services/rpcsrv/server_test.go index 5041b44bca..df0eeaf2f3 100644 --- a/pkg/services/rpcsrv/server_test.go +++ b/pkg/services/rpcsrv/server_test.go @@ -121,7 +121,7 @@ const ( // not yet deployed to the testing basic chain. invokescriptContractAVM = "VwIADBQBDAMOBQYMDQIODw0DDgcJAAAAAErZMCQE2zBwaEH4J+yMqiYEEUAMFA0PAwIJAAIBAwcDBAUCAQAOBgwJStkwJATbMHFpQfgn7IyqJgQSQBNA" // block20StateRootLE is an LE stateroot of block #20 of basic testing chain. - block20StateRootLE = "394e20adf99a6ba160df7351770dfb193ee8af174b7b3ed45f4e2ae8c43694e8" + block20StateRootLE = "bb56d46daf7da0f83102b89737402f3dff0951ec1a35d8da3851de49e0c73e97" ) var (