Skip to content

Commit cdadf57

Browse files
nolashnonsense
authored andcommitted
p2p/simulations: Enable access to MsgEvents with execadapter (#19749)
1 parent 60c062e commit cdadf57

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

‎p2p/simulations/adapters/exec.go‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,7 @@ func (e *ExecAdapter) NewNode(config *NodeConfig) (Node, error) {
9696
if err != nil {
9797
return nil, err
9898
}
99+
99100
// generate the config
100101
conf := &execNodeConfig{
101102
Stack: node.DefaultConfig,
@@ -106,11 +107,13 @@ func (e *ExecAdapter) NewNode(config *NodeConfig) (Node, error) {
106107
} else {
107108
conf.Stack.DataDir = filepath.Join(dir, "data")
108109
}
110+
111+
// these parameters are crucial for execadapter node to run correctly
109112
conf.Stack.WSHost = "127.0.0.1"
110113
conf.Stack.WSPort = 0
111114
conf.Stack.WSOrigins = []string{"*"}
112115
conf.Stack.WSExposeAll = true
113-
conf.Stack.P2P.EnableMsgEvents = false
116+
conf.Stack.P2P.EnableMsgEvents = config.EnableMsgEvents
114117
conf.Stack.P2P.NoDiscovery = true
115118
conf.Stack.P2P.NAT = nil
116119
conf.Stack.NoUSB = true

0 commit comments

Comments
 (0)