Documentation ¶
Index ¶
- Constants
- func DefaultAccessNodeIDS(snapshot protocol.Snapshot) ([]flow.Identifier, error)
- func FlowClient(conf *FlowClientConfig) (*client.Client, error)
- func FlowIDFromHexString(accessNodeIDS ...string) ([]flow.Identifier, error)
- func GetNodeInfoForProposedNodesScript(network string) ([]byte, error)
- func InitProtocolState(db *badger.DB, storages *storage.All) (protocol.State, error)
- func InitStorage(datadir string) *badger.DB
- func InitStorageWithTruncate(datadir string, truncate bool) *badger.DB
- func InitStorages(db *badger.DB) *storage.All
- func PrettyPrint(entity interface{})
- func PrettyPrintEntity(entity flow.Entity)
- func ValidateAccessNodeIDSFlag(accessNodeIDS []string, chainID flow.ChainID, snapshot protocol.Snapshot) ([]flow.Identifier, error)
- type FlowClientConfig
Constants ¶
const ( DefaultAccessAPIPort = "9000" DefaultAccessAPISecurePort = "9001" )
const ( DefaultAccessNodeIDSMinimumMainnet = 2 DefaultAccessNodeIDSMinimum = 1 )
Variables ¶
This section is empty.
Functions ¶
func DefaultAccessNodeIDS ¶ added in v0.23.0
func DefaultAccessNodeIDS(snapshot protocol.Snapshot) ([]flow.Identifier, error)
DefaultAccessNodeIDS will return all the access node IDS in the protocol state for staked access nodes
func FlowClient ¶ added in v0.22.8
func FlowClient(conf *FlowClientConfig) (*client.Client, error)
FlowClient will return a secure or insecure flow client depending on *FlowClientConfig.Insecure
func FlowIDFromHexString ¶ added in v0.23.0
func FlowIDFromHexString(accessNodeIDS ...string) ([]flow.Identifier, error)
FlowIDFromHexString convert flow node id(s) from hex string(s) to flow identifier(s)
func GetNodeInfoForProposedNodesScript ¶ added in v0.25.0
GetNodeInfoForProposedNodesScript returns a script that will return an array of FlowIDTableStaking.NodeInfo for each node in the proposed table.
func InitProtocolState ¶ added in v0.12.0
func InitStorage ¶
func InitStorage(datadir string) *badger.DB
func InitStorageWithTruncate ¶ added in v0.11.0
func InitStorages ¶ added in v0.12.0
func PrettyPrintEntity ¶ added in v0.12.0
PrettyPrintEntity pretty print a flow entity
func ValidateAccessNodeIDSFlag ¶ added in v0.23.0
func ValidateAccessNodeIDSFlag(accessNodeIDS []string, chainID flow.ChainID, snapshot protocol.Snapshot) ([]flow.Identifier, error)
ValidateAccessNodeIDSFlag validates flag --access-node-ids and converts all ids to flow.Identifier
Types ¶
type FlowClientConfig ¶ added in v0.22.8
type FlowClientConfig struct { AccessAddress string AccessNodePubKey string AccessNodeID flow.Identifier Insecure bool }
func FlowClientConfigs ¶ added in v0.22.8
func FlowClientConfigs(accessNodeIDS []flow.Identifier, insecureAccessAPI bool, snapshot protocol.Snapshot) ([]*FlowClientConfig, error)
FlowClientConfigs will assemble connection options for the flow client for each access node id
func NewFlowClientConfig ¶ added in v0.22.8
func NewFlowClientConfig(accessAddress, accessApiNodePubKey string, accessNodeID flow.Identifier, insecure bool) (*FlowClientConfig, error)
NewFlowClientConfig returns *FlowClientConfig
func (*FlowClientConfig) String ¶ added in v0.22.8
func (f *FlowClientConfig) String() string