blockchain: server runs goroutine instead of blockchain init
rework initBlockChain in order to have controllable way of running blockchain; remove context from initBlockChain func;
This commit is contained in:
parent
39a024eb03
commit
adc880d323
4 changed files with 9 additions and 9 deletions
|
@ -2,7 +2,6 @@ package rpc
|
|||
|
||||
import (
|
||||
"bytes"
|
||||
"context"
|
||||
"fmt"
|
||||
"io/ioutil"
|
||||
"net/http"
|
||||
|
@ -248,7 +247,7 @@ func TestHandler(t *testing.T) {
|
|||
|
||||
store, err := storage.NewLevelDBStore(cfg.ApplicationConfiguration.DBConfiguration.LevelDBOptions)
|
||||
assert.Nil(t, err)
|
||||
chain, err := core.NewBlockchain(context.Background(), store, cfg.ProtocolConfiguration)
|
||||
chain, err := core.NewBlockchain(store, cfg.ProtocolConfiguration)
|
||||
require.NoError(t, err, "could not create levelDB chain")
|
||||
|
||||
serverConfig := network.NewServerConfig(cfg)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue