Documentation
¶
Index ¶
- Constants
- Variables
- type BasicMsg
- func (m *BasicMsg) AfterAttach(n *Node) error
- func (m *BasicMsg) DisplayinJson() error
- func (m *BasicMsg) Encode() ([]byte, error)
- func (m *BasicMsg) GetHash() []byte
- func (m *BasicMsg) GetRN() int
- func (m *BasicMsg) GetRefs() [][]byte
- func (m *BasicMsg) GetSource() []byte
- func (m *BasicMsg) HavePath(msg Message, rounds []*Round, targetround *Round) (bool, error)
- func (m *BasicMsg) VerifyFields(n *Node) error
- type Blockchain
- type FRoundMsg
- type LRoundMsg
- type LeaderSelector
- type Message
- type Messagehandler
- type Node
- type PlainMsg
- type Round
- type SigsPerWave
- type StaticCommitter
- type Statichandler
- type ThresSigMsg
Constants ¶
View Source
const ( FMsgTag uint8 = iota BMsgTag LMsgTag TMsgTag )
View Source
const Batchsize = 1000
Variables ¶
Functions ¶
This section is empty.
Types ¶
type BasicMsg ¶
type BasicMsg struct { Rn int `json:"rn"` References [][]byte `json:"references"` Source []byte `json:"source"` Hash []byte `json:hash` // contains filtered or unexported fields }
func (*BasicMsg) AfterAttach ¶
func (*BasicMsg) DisplayinJson ¶
func (*BasicMsg) VerifyFields ¶
type Blockchain ¶
type Blockchain struct {
// contains filtered or unexported fields
}
func NewBlockchain ¶
func NewBlockchain() (*Blockchain, error)
func (*Blockchain) AddRound ¶
func (bc *Blockchain) AddRound(round *Round)
func (*Blockchain) GetRound ¶
func (bc *Blockchain) GetRound(round int) *Round
type LRoundMsg ¶
func (*LRoundMsg) AfterAttach ¶
type LeaderSelector ¶
type LeaderSelector struct {
// contains filtered or unexported fields
}
func NewLeaderSelector ¶
func NewLeaderSelector(n *Node) *LeaderSelector
func (*LeaderSelector) ChooseLeader ¶
func (ls *LeaderSelector) ChooseLeader(sigs *SigsPerWave) (int, error)
type Message ¶
type Message interface { Encode() ([]byte, error) DisplayinJson() error //MarshalJSON() ([]byte, error) GetRefs() [][]byte HavePath(msg Message, msgbyrounds []*Round, targetmsground *Round) (bool, error) GetRN() int GetHash() []byte GetSource() []byte VerifyFields(*Node) error AfterAttach(*Node) error }
type Messagehandler ¶
type Messagehandler interface {
// contains filtered or unexported methods
}
type Node ¶
type Node struct {
// contains filtered or unexported fields
}
func StartandConnect ¶
func (*Node) HandleMsgForever ¶
func (n *Node) HandleMsgForever()
func (*Node) SendForever ¶
func (n *Node) SendForever()
type SigsPerWave ¶
type SigsPerWave struct {
// contains filtered or unexported fields
}
type StaticCommitter ¶
type StaticCommitter struct {
// contains filtered or unexported fields
}
func NewStaticCommitter ¶
func NewStaticCommitter(n *Node) *StaticCommitter
type Statichandler ¶
type Statichandler struct {
// contains filtered or unexported fields
}
func NewStatichandler ¶
func NewStatichandler(n *Node) *Statichandler
func (*Statichandler) VerifyandCheckMsg ¶
func (sh *Statichandler) VerifyandCheckMsg(msg Message, sig []byte, msgbytes []byte) error
type ThresSigMsg ¶
Click to show internal directories.
Click to hide internal directories.