diff options
author | lash <nolash@users.noreply.github.com> | 2019-06-21 19:45:32 +0800 |
---|---|---|
committer | Anton Evangelatov <anton.evangelatov@gmail.com> | 2019-06-21 19:45:32 +0800 |
commit | cdadf57bf9d25744eaafddea34a4a66fead9f04b (patch) | |
tree | 3f1f19fa5a5d84fd9aae5d29a6df430ca68f4bc5 | |
parent | 60c062e17df7cac4addbec1a216daedf83af876e (diff) | |
download | go-tangerine-cdadf57bf9d25744eaafddea34a4a66fead9f04b.tar.gz go-tangerine-cdadf57bf9d25744eaafddea34a4a66fead9f04b.tar.zst go-tangerine-cdadf57bf9d25744eaafddea34a4a66fead9f04b.zip |
p2p/simulations: Enable access to MsgEvents with execadapter (#19749)
-rw-r--r-- | p2p/simulations/adapters/exec.go | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/p2p/simulations/adapters/exec.go b/p2p/simulations/adapters/exec.go index 106b179e4..4f17efc33 100644 --- a/p2p/simulations/adapters/exec.go +++ b/p2p/simulations/adapters/exec.go @@ -96,6 +96,7 @@ func (e *ExecAdapter) NewNode(config *NodeConfig) (Node, error) { if err != nil { return nil, err } + // generate the config conf := &execNodeConfig{ Stack: node.DefaultConfig, @@ -106,11 +107,13 @@ func (e *ExecAdapter) NewNode(config *NodeConfig) (Node, error) { } else { conf.Stack.DataDir = filepath.Join(dir, "data") } + + // these parameters are crucial for execadapter node to run correctly conf.Stack.WSHost = "127.0.0.1" conf.Stack.WSPort = 0 conf.Stack.WSOrigins = []string{"*"} conf.Stack.WSExposeAll = true - conf.Stack.P2P.EnableMsgEvents = false + conf.Stack.P2P.EnableMsgEvents = config.EnableMsgEvents conf.Stack.P2P.NoDiscovery = true conf.Stack.P2P.NAT = nil conf.Stack.NoUSB = true |