Documentation ¶
Index ¶
- Constants
- Variables
- func GetPriveKey(keypath, keypass string) (*ecdsa.PrivateKey, error)
- func ParseIP(p string) (string, error)
- func SelectedNode(self string, nodes []types.HeartBeat, max int) []string
- func SetFairConfig(ctx *cli.Context, keypass, dbpass string)
- type Config
- type Fairnode
- func (fn *Fairnode) Database() fairdb.FairnodeDB
- func (fn *Fairnode) GetAddress() common.Address
- func (fn *Fairnode) GetPublicKey() ecdsa.PublicKey
- func (fn *Fairnode) IsLeader() bool
- func (fn *Fairnode) LeagueSet() map[common.Hash]*league
- func (fn *Fairnode) Leagues() map[common.Hash]*fs.Leagues
- func (fn *Fairnode) RoleCheckChannel() chan fs.FnType
- func (fn *Fairnode) SignHash(hash []byte) ([]byte, error)
- func (fn *Fairnode) Start() error
- func (fn *Fairnode) Stop()
- func (fn *Fairnode) SyncMessageChannel() chan []fs.Leagues
Constants ¶
View Source
const ( CLEAN_OLD_NODE_TERM = 3 // per min CHECK_ACTIVE_NODE_TERM = 3 // per sec //MIN_LEAGUE_NUM = 1 SEND_BLOCK_TIME_OUT = 10 * 5 // 200ms * 10 * 5 -> max : 10sec LEAGUE_WAIE_TIME_OUT = 5 * 5 // 200ms * 5 * 5 -> max : 5sec )
crypto.HexToECDSA("09bfa4fac90f9daade1722027f6350518c0c2a69728793f8753b2d166ada1a9c") - for test private key 0x10Ca4B84feF9Fce8910cb58aCf77255a1A8b61fD - for test addresss
View Source
const (
LeagueSelectCount = 5 // node count for making league
)
Variables ¶
Functions ¶
func GetPriveKey ¶
func GetPriveKey(keypath, keypass string) (*ecdsa.PrivateKey, error)
func SetFairConfig ¶
func SetFairConfig(ctx *cli.Context, keypass, dbpass string)
Types ¶
type Config ¶
type Config struct { FairNodeDir string // DB setting UseSRV bool DBhost string DBport string DBuser string DBpass string DBoption string SSL_path string // for connection mongodb using ssl cert //key KeyPath string KeyPass string Port string // 네트워크 포트, for node SubPort string // fairnode to fairnode port ChainID *big.Int Debug bool Version string Memorydb bool }
type Fairnode ¶
type Fairnode struct {
// contains filtered or unexported fields
}
func NewFairnode ¶
func (*Fairnode) Database ¶
func (fn *Fairnode) Database() fairdb.FairnodeDB
func (*Fairnode) GetAddress ¶
func (*Fairnode) GetPublicKey ¶
func (*Fairnode) RoleCheckChannel ¶
func (*Fairnode) SyncMessageChannel ¶
Click to show internal directories.
Click to hide internal directories.