erigon-pulse/cmd/devnet/requests/requests.go
Leonard Chinonso 9d172ae125
Devnet Remake (#5532)
* Rebuilding the devnet tool for better quality

* Added README

* deleted former devnettest folder

* Correction changes

* Implementation node connection through enode for two nodes

* synced two nodes, moving to logging

* Fixed lint
2022-09-30 21:04:34 +01:00

19 lines
463 B
Go

package requests
import (
"fmt"
"github.com/ledgerwatch/erigon/cmd/devnet/models"
"github.com/ledgerwatch/erigon/p2p"
)
func AdminNodeInfo(reqId int) (p2p.NodeInfo, error) {
reqGen := initialiseRequestGenerator(reqId)
var b models.AdminNodeInfoResponse
if res := reqGen.Erigon("admin_nodeInfo", reqGen.getAdminNodeInfo(), &b); res.Err != nil {
return p2p.NodeInfo{}, fmt.Errorf("failed to get admin node info: %v", res.Err)
}
return b.Result, nil
}