Updated CHT (#279)

Syncing for Ropsten should now start from something around block 1617921 and from 839680 for Rinkeby.
This commit is contained in:
Ivan Tomilov 2017-09-07 10:54:33 +03:00 committed by GitHub
parent 792cd1d9c5
commit 9463d3843a
4 changed files with 46 additions and 47 deletions

View File

@ -14,27 +14,9 @@ import (
"github.com/status-im/status-go/geth/node"
"github.com/status-im/status-go/geth/params"
. "github.com/status-im/status-go/geth/testing"
"github.com/stretchr/testify/require"
"github.com/stretchr/testify/suite"
)
func TestStartNodeWithUpstreamEnabled(t *testing.T) {
backend := api.NewStatusBackend()
require.NotNil(t, backend)
nodeConfig, err := MakeTestNodeConfig(params.RopstenNetworkID)
require.NoError(t, err)
nodeConfig.UpstreamConfig.Enabled = true
nodeStarted, err := backend.StartNode(nodeConfig)
require.NoError(t, err)
defer backend.StopNode()
<-nodeStarted
require.True(t, backend.IsNodeRunning())
}
func TestBackendTestSuite(t *testing.T) {
suite.Run(t, new(BackendTestSuite))
}
@ -170,6 +152,25 @@ func (s *BackendTestSuite) TestNodeStartStop() {
require.True(s.backend.IsNodeRunning())
}
func (s *BackendTestSuite) TestStartNodeWithUpstreamEnabled(t *testing.T) {
require := s.Require()
backend := api.NewStatusBackend()
require.NotNil(t, backend)
nodeConfig, err := MakeTestNodeConfig(params.RopstenNetworkID)
require.NoError(err)
nodeConfig.UpstreamConfig.Enabled = true
nodeStarted, err := backend.StartNode(nodeConfig)
require.NoError(err)
defer backend.StopNode()
<-nodeStarted
require.True(backend.IsNodeRunning())
}
// FIXME(tiabc): There's also a test with the same name in geth/node/rpc_test.go
// so this test should only check StatusBackend logic with a mocked version of the underlying NodeManager.
func (s *BackendTestSuite) TestCallRPC() {

View File

@ -72,13 +72,11 @@ func MakeNode(config *params.NodeConfig) (*node.Node, error) {
// start Ethereum service if we are not expected to use an upstream server.
if !config.UpstreamConfig.Enabled {
if err := activateEthService(stack, config); err != nil {
return nil, fmt.Errorf("%v: %v", ErrEthServiceRegistrationFailure, err)
}
} else {
log.Info("Blockchain synchronization is switched off, RPC requests will be proxied to %s", config.UpstreamConfig.URL)
log.Info("Blockchain synchronization is switched off, RPC requests will be proxied to " + config.UpstreamConfig.URL)
}
// start Whisper service

File diff suppressed because one or more lines are too long

View File

@ -3,8 +3,8 @@
"networkID": 3,
"genesisHash": "0x41941023680923e0fe4d74a34bdac8141f2540e3ae90623718e47d66d1ca4a2d",
"prod": {
"number": 259,
"hash": "91825fffecb5678167273955deaddbf03c26ae04287cfda61403c0bad5ceab8d",
"number": 395,
"hash": "673363514b866bbbaf1b94462203650e3b1a2d4fb498df33361458b465b61ca3",
"bootnodes": [
"enode://7ab298cedc4185a894d21d8a4615262ec6bdce66c9b6783878258e0d5b31013d30c9038932432f70e5b2b6a5cd323bf820554fcb22fbc7b45367889522e9c449@51.15.63.93:30303",
"enode://f59e8701f18c79c5cbc7618dc7bb928d44dc2f5405c7d693dad97da2d8585975942ec6fd36d3fe608bfdc7270a34a4dd00f38cfe96b2baa24f7cd0ac28d382a1@51.15.79.88:30303",
@ -24,8 +24,8 @@
]
},
"dev": {
"number": 259,
"hash": "91825fffecb5678167273955deaddbf03c26ae04287cfda61403c0bad5ceab8d",
"number": 395,
"hash": "673363514b866bbbaf1b94462203650e3b1a2d4fb498df33361458b465b61ca3",
"bootnodes": [
"enode://7ab298cedc4185a894d21d8a4615262ec6bdce66c9b6783878258e0d5b31013d30c9038932432f70e5b2b6a5cd323bf820554fcb22fbc7b45367889522e9c449@51.15.63.93:30303",
"enode://f59e8701f18c79c5cbc7618dc7bb928d44dc2f5405c7d693dad97da2d8585975942ec6fd36d3fe608bfdc7270a34a4dd00f38cfe96b2baa24f7cd0ac28d382a1@51.15.79.88:30303",
@ -49,8 +49,8 @@
"networkID": 4,
"genesisHash": "0x6341fd3daf94b748c72ced5a5b26028f2474f5f00d824504e4fa37a75767e177",
"prod": {
"number": 66,
"hash": "rinkeby-prod",
"number": 205,
"hash": "f946d8f4d46d5b8a68006485cef0d1583db4a45feab83661323d4d52000aa2db",
"bootnodes": [
"enode://fda3f6273a0f2da4ac5858d1f52e5afaf9def281121be3d37558c67d4d9ca26c6ad7a0520b2cd7454120fb770e86d5760487c9924b2166e65485f606e56d60fc@51.15.69.144:30303",
"enode://ba41aa829287a0a9076d9bffed97c8ce2e491b99873288c9e886f16fd575306ac6c656db4fbf814f5a9021aec004ffa9c0ae8650f92fd10c12eeb7c364593eb3@51.15.69.147:30303",
@ -58,8 +58,8 @@
]
},
"dev": {
"number": 66,
"hash": "rinkeby-dev",
"number": 205,
"hash": "f946d8f4d46d5b8a68006485cef0d1583db4a45feab83661323d4d52000aa2db",
"bootnodes": [
"enode://7512c8f6e7ffdcc723cf77e602a1de9d8cc2e8ad35db309464819122cd773857131aee390fec33894db13da730c8432bb248eed64039e3810e156e979b2847cb@51.15.78.243:30303",
"enode://1cc27a5a41130a5c8b90db5b2273dc28f7b56f3edfc0dcc57b665d451274b26541e8de49ea7a074281906a82209b9600239c981163b6ff85c3038a8e2bc5d8b8@51.15.68.93:30303",