Documentation ¶
Index ¶
- func NewNodeKeeper(origin *core.Node) network.NodeKeeper
- func NewNodeNetwork(configuration configuration.Configuration) (core.NodeNetwork, error)
- type UnsyncList
- func (u *UnsyncList) AddUnsyncHash(ref core.RecordRef, hash []*network.NodeUnsyncHash)
- func (u *UnsyncList) AddUnsyncList(ref core.RecordRef, unsync []*core.Node)
- func (u *UnsyncList) GetHash(blockTimeout time.Duration) ([]*network.NodeUnsyncHash, error)
- func (u *UnsyncList) GetPulse() core.PulseNumber
- func (u *UnsyncList) GetUnsync() []*core.Node
- func (u *UnsyncList) GetUnsyncHash(ref core.RecordRef) ([]*network.NodeUnsyncHash, bool)
- func (u *UnsyncList) GetUnsyncList(ref core.RecordRef) ([]*core.Node, bool)
- func (u *UnsyncList) SetHash(hash []*network.NodeUnsyncHash)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewNodeKeeper ¶ added in v0.5.0
func NewNodeKeeper(origin *core.Node) network.NodeKeeper
NewNodeKeeper create new NodeKeeper
func NewNodeNetwork ¶ added in v0.6.2
func NewNodeNetwork(configuration configuration.Configuration) (core.NodeNetwork, error)
NewNodeNetwork create active node component
Types ¶
type UnsyncList ¶ added in v0.6.0
type UnsyncList struct {
// contains filtered or unexported fields
}
func NewUnsyncHolder ¶ added in v0.6.0
func NewUnsyncHolder(pulse core.PulseNumber, unsync []*core.Node) *UnsyncList
NewUnsyncHolder create new object to hold data for consensus
func (*UnsyncList) AddUnsyncHash ¶ added in v0.6.0
func (u *UnsyncList) AddUnsyncHash(ref core.RecordRef, hash []*network.NodeUnsyncHash)
AddUnsyncHash add unsync hash for remote ref
func (*UnsyncList) AddUnsyncList ¶ added in v0.6.0
func (u *UnsyncList) AddUnsyncList(ref core.RecordRef, unsync []*core.Node)
AddUnsyncList add unsync list for remote ref
func (*UnsyncList) GetHash ¶ added in v0.6.0
func (u *UnsyncList) GetHash(blockTimeout time.Duration) ([]*network.NodeUnsyncHash, error)
GetHash get hash of unsync lists for each node of consensus. If hash is not calculated yet, then this call blocks until the hash is calculated with SetHash() call
func (*UnsyncList) GetPulse ¶ added in v0.6.0
func (u *UnsyncList) GetPulse() core.PulseNumber
GetPulse returns actual pulse for current consensus process.
func (*UnsyncList) GetUnsync ¶ added in v0.6.0
func (u *UnsyncList) GetUnsync() []*core.Node
GetUnsync returns list of local unsync nodes. This list is created
func (*UnsyncList) GetUnsyncHash ¶ added in v0.6.0
func (u *UnsyncList) GetUnsyncHash(ref core.RecordRef) ([]*network.NodeUnsyncHash, bool)
GetUnsyncHash get unsync hash for remote ref
func (*UnsyncList) GetUnsyncList ¶ added in v0.6.0
GetUnsyncList get unsync list for remote ref
func (*UnsyncList) SetHash ¶ added in v0.6.0
func (u *UnsyncList) SetHash(hash []*network.NodeUnsyncHash)
SetHash sets hash of unsync lists for each node of consensus.