Documentation ¶
Index ¶
- Variables
- func CheckIfDuplicate(array []string, item string) bool
- func ConvertURLToWS(url string) string
- func CreateTlsCertificate() (tls.Certificate, error)
- type LeaderTPUCache
- func (leaderTPUCache *LeaderTPUCache) FetchClusterTPUSockets() (map[string]string, error)
- func (leaderTPUCache *LeaderTPUCache) FetchSlotLeaders(startSlot uint64, slotsInEpoch uint64) ([]solana.PublicKey, error)
- func (leaderTPUCache *LeaderTPUCache) GetLeaderSockets(fanoutSlots uint64) []string
- func (leaderTPUCache *LeaderTPUCache) GetLeaderSocketsConverted(fanoutSlots uint64) []*net.UDPAddr
- func (leaderTPUCache *LeaderTPUCache) GetSlotLeader(slot uint64) solana.PublicKey
- func (leaderTPUCache *LeaderTPUCache) LastSlot() uint64
- func (leaderTPUCache *LeaderTPUCache) Load(connection *rpc.Client, startSlot uint64) error
- type LeaderTPUService
- type RecentLeaderSlots
- type TPUClient
- func (tpuClient *TPUClient) Load(connection *rpc.Client, websocketURL string, config TPUClientConfig) error
- func (tpuClient *TPUClient) SendRawTransaction(transaction []byte, amount int) error
- func (tpuClient *TPUClient) SendRawTransactionThroughSocket(transaction []byte, amount int, socket *net.UDPConn) error
- func (tpuClient *TPUClient) SendTransaction(transaction *solana.Transaction, amount int) (solana.Signature, error)
- func (tpuClient *TPUClient) SendTransactionThroughSocket(transaction *solana.Transaction, amount int, socket *net.UDPConn) (solana.Signature, error)
- type TPUClientConfig
Constants ¶
This section is empty.
Variables ¶
View Source
var DEFAULT_FANOUT_SLOTS uint64 = 12
View Source
var MAX_FANOUT_SLOTS uint64 = 100
View Source
var MAX_SLOT_SKIP_DISTANCE uint64 = 48
Functions ¶
func CheckIfDuplicate ¶
func ConvertURLToWS ¶
func CreateTlsCertificate ¶ added in v0.0.2
func CreateTlsCertificate() (tls.Certificate, error)
Types ¶
type LeaderTPUCache ¶
type LeaderTPUCache struct { LeaderTPUMap map[string]string Connection *rpc.Client FirstSlot uint64 SlotsInEpoch uint64 LastEpochInfoSlot uint64 Leaders []solana.PublicKey }
func (*LeaderTPUCache) FetchClusterTPUSockets ¶
func (leaderTPUCache *LeaderTPUCache) FetchClusterTPUSockets() (map[string]string, error)
func (*LeaderTPUCache) FetchSlotLeaders ¶
func (leaderTPUCache *LeaderTPUCache) FetchSlotLeaders(startSlot uint64, slotsInEpoch uint64) ([]solana.PublicKey, error)
func (*LeaderTPUCache) GetLeaderSockets ¶
func (leaderTPUCache *LeaderTPUCache) GetLeaderSockets(fanoutSlots uint64) []string
func (*LeaderTPUCache) GetLeaderSocketsConverted ¶
func (leaderTPUCache *LeaderTPUCache) GetLeaderSocketsConverted(fanoutSlots uint64) []*net.UDPAddr
func (*LeaderTPUCache) GetSlotLeader ¶
func (leaderTPUCache *LeaderTPUCache) GetSlotLeader(slot uint64) solana.PublicKey
func (*LeaderTPUCache) LastSlot ¶
func (leaderTPUCache *LeaderTPUCache) LastSlot() uint64
type LeaderTPUService ¶
type LeaderTPUService struct { RecentSlots *RecentLeaderSlots LTPUCache *LeaderTPUCache Subscription *ws.SlotsUpdatesSubscription Connection *rpc.Client WSConnection *ws.Client LeaderConnections []net.Conn }
func (*LeaderTPUService) LeaderTPUSockets ¶
func (leaderTPUService *LeaderTPUService) LeaderTPUSockets(fanoutSlots uint64) []string
func (*LeaderTPUService) Run ¶
func (leaderTPUService *LeaderTPUService) Run(fanout uint64)
type RecentLeaderSlots ¶
type RecentLeaderSlots struct {
RecentSlots []float64
}
func (*RecentLeaderSlots) EstimatedCurrentSlot ¶
func (recentLeaderSlots *RecentLeaderSlots) EstimatedCurrentSlot() uint64
func (*RecentLeaderSlots) Load ¶
func (recentLeaderSlots *RecentLeaderSlots) Load(currentSlot uint64)
func (*RecentLeaderSlots) RecordSlot ¶
func (recentLeaderSlots *RecentLeaderSlots) RecordSlot(currentSlot uint64)
type TPUClient ¶
type TPUClient struct { FanoutSlots uint64 LTPUService *LeaderTPUService Exit bool Connection *rpc.Client }
func (*TPUClient) SendRawTransaction ¶
func (*TPUClient) SendRawTransactionThroughSocket ¶
func (*TPUClient) SendTransaction ¶
type TPUClientConfig ¶
type TPUClientConfig struct {
FanoutSlots uint64
}
Click to show internal directories.
Click to hide internal directories.