Documentation
¶
Index ¶
- type ContractHash
- type Discovery
- type HashURL
- type LaunchData
- type Network
- func (c *Network) CalculateWeights() error
- func (c *Network) ChainID() []byte
- func (c *Network) ConsensusLaunchData() (*LaunchData, error)
- func (c *Network) DownloadDiscoveryURL(discoveryURL string) (out *Discovery, rawDiscovery []byte, err error)
- func (c *Network) DownloadHashURL(discoveryURL string, hu HashURL) error
- func (c *Network) FetchAll() error
- func (c *Network) FetchOne(discoveryURL string) error
- func (c *Network) FileNameFromCache(fileName string) string
- func (c *Network) LoadCache(initialDiscoveryURL string) error
- func (c *Network) OrderedPeers() []*Peer
- func (c *Network) PrintOrderedPeers()
- func (c *Network) ReachedConsensus() bool
- func (c *Network) ReadFromCache(fileName string) ([]byte, error)
- func (c *Network) ReaderFromCache(fileName string) (io.ReadCloser, error)
- func (c *Network) ValidateLocalFile(filename string) error
- func (c *Network) VerifyGraph() error
- type Peer
- type Wingman
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ContractHash ¶
type Discovery ¶
type Discovery struct {
// Testnet is true if this discovery file represents a testing
// network.
Testnet bool `json:"testnet"`
// Mainnet is true if this discovery file represents the main net
// (or a production network). One of Testnet and Mainnet must be
// `true`, and are mutually exclusive.
Mainnet bool `json:"mainnet"`
EOSIOAccountName string `json:"eosio_account_name"`
EOSIOABPSigningKey ecc.PublicKey `json:"eosio_appointed_block_producer_signing_key"`
EOSIOInitialAuthority struct {
Owner eos.Authority `json:"owner"`
Active eos.Authority `json:"active"`
Recovery eos.Authority `json:"recovery"`
} `json:"eosio_initial_authority"`
Website string `json:"website"`
IntroductionPostURL string `json:"introduction_post_url"`
SocialFacebook string `json:"social_facebook"`
SocialTwitter string `json:"social_twitter"`
SocialYouTube string `json:"social_youtube"`
SocialTelegram string `json:"social_telegram"`
SocialWeChat string `json:"social_wechat"`
SocialSlack string `json:"social_slack"`
SocialSteemIt string `json:"social_steemit"`
SocialSteem string `json:"social_steem"`
SocialGitHub string `json:"social_github"`
SocialKeybase string `json:"social_keybase"`
OrganizationName string `json:"organization_name"`
OrganizationTagline string `json:"organization_tagline"`
LaunchData LaunchData `json:"launch_data"`
ClonedFrom string `json:"-"`
}
Discovery is data published autonomously by Block Producer candidates. LaunchData will contain the topology and build up the graph. Otherwise, this data is simply metadata about a BP.
type HashURL ¶
type HashURL struct {
// Hash is the important bit, used to weight in votes from
// different BPs.
Hash string `json:"hash"`
// URL is the downloadable location of the resource, which should
// hash to `Hash`.
URL string `json:"url"`
// Comment has any relevant details, how the resource was built,
// produced, who did it, when, based on what revision of which
// source code, and whatnot.
Comment string `json:"comment"`
}
type LaunchData ¶
type Network ¶
type Network struct {
ForceFetch bool
// contains filtered or unexported fields
}
func NewNetwork ¶
func (*Network) CalculateWeights ¶
func (*Network) ConsensusLaunchData ¶
func (c *Network) ConsensusLaunchData() (*LaunchData, error)
func (*Network) DownloadDiscoveryURL ¶
func (*Network) DownloadHashURL ¶
func (*Network) FileNameFromCache ¶
func (*Network) OrderedPeers ¶
func (*Network) PrintOrderedPeers ¶
func (c *Network) PrintOrderedPeers()
func (*Network) ReachedConsensus ¶
ReachedConsensus reads all the hashes of the top-level peers and returns true if we have reached an agreement on the content to inject in the chain.
func (*Network) ReaderFromCache ¶
func (c *Network) ReaderFromCache(fileName string) (io.ReadCloser, error)
func (*Network) ValidateLocalFile ¶
func (*Network) VerifyGraph ¶
Click to show internal directories.
Click to hide internal directories.