rpc

package
v0.0.0-...-1f8a15b Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 12, 2023 License: GPL-3.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BeaconRpcP2P

type BeaconRpcP2P struct {
	// contains filtered or unexported fields
}

BeaconRpcP2P represents a beacon chain RPC client.

func NewBeaconRpcP2P

func NewBeaconRpcP2P(ctx context.Context, sentinel sentinel.SentinelClient, beaconConfig *clparams.BeaconChainConfig, genesisConfig *clparams.GenesisConfig) *BeaconRpcP2P

NewBeaconRpcP2P creates a new BeaconRpcP2P struct and returns a pointer to it. It takes a context, a sentinel.Sent

func (*BeaconRpcP2P) BanPeer

func (b *BeaconRpcP2P) BanPeer(pid string)

func (*BeaconRpcP2P) Peers

func (b *BeaconRpcP2P) Peers() (uint64, error)

Peers retrieves peer count.

func (*BeaconRpcP2P) PropagateBlock

func (b *BeaconRpcP2P) PropagateBlock(block *cltypes.SignedBeaconBlock) error

func (*BeaconRpcP2P) SendBeaconBlocksByRangeReq

func (b *BeaconRpcP2P) SendBeaconBlocksByRangeReq(ctx context.Context, start, count uint64) ([]*cltypes.SignedBeaconBlock, string, error)

SendBeaconBlocksByRangeReq retrieves blocks range from beacon chain.

func (*BeaconRpcP2P) SendBeaconBlocksByRootReq

func (b *BeaconRpcP2P) SendBeaconBlocksByRootReq(ctx context.Context, roots [][32]byte) ([]*cltypes.SignedBeaconBlock, string, error)

SendBeaconBlocksByRootReq retrieves blocks by root from beacon chain.

func (*BeaconRpcP2P) SetStatus

func (b *BeaconRpcP2P) SetStatus(finalizedRoot libcommon.Hash, finalizedEpoch uint64, headRoot libcommon.Hash, headSlot uint64) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL