forked from cerc-io/plugeth
p2p/simulations: Enable access to MsgEvents with execadapter (#19749)
This commit is contained in:
parent
60c062e17d
commit
cdadf57bf9
@ -96,6 +96,7 @@ func (e *ExecAdapter) NewNode(config *NodeConfig) (Node, error) {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
// generate the config
|
// generate the config
|
||||||
conf := &execNodeConfig{
|
conf := &execNodeConfig{
|
||||||
Stack: node.DefaultConfig,
|
Stack: node.DefaultConfig,
|
||||||
@ -106,11 +107,13 @@ func (e *ExecAdapter) NewNode(config *NodeConfig) (Node, error) {
|
|||||||
} else {
|
} else {
|
||||||
conf.Stack.DataDir = filepath.Join(dir, "data")
|
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.WSHost = "127.0.0.1"
|
||||||
conf.Stack.WSPort = 0
|
conf.Stack.WSPort = 0
|
||||||
conf.Stack.WSOrigins = []string{"*"}
|
conf.Stack.WSOrigins = []string{"*"}
|
||||||
conf.Stack.WSExposeAll = true
|
conf.Stack.WSExposeAll = true
|
||||||
conf.Stack.P2P.EnableMsgEvents = false
|
conf.Stack.P2P.EnableMsgEvents = config.EnableMsgEvents
|
||||||
conf.Stack.P2P.NoDiscovery = true
|
conf.Stack.P2P.NoDiscovery = true
|
||||||
conf.Stack.P2P.NAT = nil
|
conf.Stack.P2P.NAT = nil
|
||||||
conf.Stack.NoUSB = true
|
conf.Stack.NoUSB = true
|
||||||
|
Loading…
Reference in New Issue
Block a user