erigon-pulse/cmd/rpcdaemon/commands/erigon_nodeInfo.go
Dmitry Savelev d4f6ceff1c
Add NodeInfo implementation (#3046)
* Add NodeInfo implementation

* replace magic value with a constant.

* update dependencies

* bump minor version

* add nodes deduplication logic.

* shuffle values in test cases a little.
2021-11-30 22:42:12 +00:00

17 lines
330 B
Go

package commands
import (
"context"
"github.com/ledgerwatch/erigon/p2p"
)
const (
// allNodesInfo used in NodeInfo request to receive meta data from all running sentries.
allNodesInfo = 0
)
func (api *ErigonImpl) NodeInfo(ctx context.Context) ([]p2p.NodeInfo, error) {
return api.ethBackend.NodeInfo(ctx, allNodesInfo)
}