aboutsummaryrefslogtreecommitdiffstats
path: root/p2p/simulations/http.go
diff options
context:
space:
mode:
Diffstat (limited to 'p2p/simulations/http.go')
-rw-r--r--p2p/simulations/http.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/p2p/simulations/http.go b/p2p/simulations/http.go
index 97dd742e8..24001f194 100644
--- a/p2p/simulations/http.go
+++ b/p2p/simulations/http.go
@@ -561,7 +561,8 @@ func (s *Server) LoadSnapshot(w http.ResponseWriter, req *http.Request) {
// CreateNode creates a node in the network using the given configuration
func (s *Server) CreateNode(w http.ResponseWriter, req *http.Request) {
- config := adapters.RandomNodeConfig()
+ config := &adapters.NodeConfig{}
+
err := json.NewDecoder(req.Body).Decode(config)
if err != nil && err != io.EOF {
http.Error(w, err.Error(), http.StatusBadRequest)