mirror of
https://gitlab.com/pulsechaincom/erigon-pulse.git
synced 2025-01-08 03:51:20 +00:00
708ea9225d
Co-authored-by: Alex Sharp <alexsharp@Alexs-MacBook-Pro-2.local>
20 lines
490 B
Go
20 lines
490 B
Go
package requests
|
|
|
|
import (
|
|
"fmt"
|
|
|
|
"github.com/ledgerwatch/erigon/cmd/devnet/models"
|
|
"github.com/ledgerwatch/erigon/p2p"
|
|
"github.com/ledgerwatch/log/v3"
|
|
)
|
|
|
|
func AdminNodeInfo(reqGen *RequestGenerator, logger log.Logger) (p2p.NodeInfo, error) {
|
|
var b models.AdminNodeInfoResponse
|
|
|
|
if res := reqGen.Erigon(models.AdminNodeInfo, reqGen.GetAdminNodeInfo(), &b); res.Err != nil {
|
|
return p2p.NodeInfo{}, fmt.Errorf("failed to get admin node info: %v", res.Err)
|
|
}
|
|
|
|
return b.Result, nil
|
|
}
|