2020-08-08 01:37:08 +00:00
|
|
|
package protoarray
|
|
|
|
|
2021-02-16 07:45:34 +00:00
|
|
|
import (
|
|
|
|
types "github.com/prysmaticlabs/eth2-types"
|
|
|
|
)
|
2021-02-09 10:05:22 +00:00
|
|
|
|
2020-08-08 01:37:08 +00:00
|
|
|
// Slot of the fork choice node.
|
2021-02-16 07:45:34 +00:00
|
|
|
func (n *Node) Slot() types.Slot {
|
2020-08-08 01:37:08 +00:00
|
|
|
return n.slot
|
|
|
|
}
|
|
|
|
|
|
|
|
// Root of the fork choice node.
|
|
|
|
func (n *Node) Root() [32]byte {
|
|
|
|
return n.root
|
|
|
|
}
|
|
|
|
|
|
|
|
// Parent of the fork choice node.
|
|
|
|
func (n *Node) Parent() uint64 {
|
|
|
|
return n.parent
|
|
|
|
}
|
|
|
|
|
|
|
|
// JustifiedEpoch of the fork choice node.
|
2021-02-09 10:05:22 +00:00
|
|
|
func (n *Node) JustifiedEpoch() types.Epoch {
|
2020-08-08 01:37:08 +00:00
|
|
|
return n.justifiedEpoch
|
|
|
|
}
|
|
|
|
|
|
|
|
// FinalizedEpoch of the fork choice node.
|
2021-02-09 10:05:22 +00:00
|
|
|
func (n *Node) FinalizedEpoch() types.Epoch {
|
2020-08-08 01:37:08 +00:00
|
|
|
return n.finalizedEpoch
|
|
|
|
}
|
|
|
|
|
|
|
|
// Weight of the fork choice node.
|
|
|
|
func (n *Node) Weight() uint64 {
|
|
|
|
return n.weight
|
|
|
|
}
|
|
|
|
|
|
|
|
// BestChild of the fork choice node.
|
|
|
|
func (n *Node) BestChild() uint64 {
|
|
|
|
return n.bestChild
|
|
|
|
}
|
|
|
|
|
|
|
|
// BestDescendant of the fork choice node.
|
|
|
|
func (n *Node) BestDescendant() uint64 {
|
|
|
|
return n.bestDescendant
|
|
|
|
}
|
|
|
|
|
|
|
|
// Graffiti of the fork choice node.
|
|
|
|
func (n *Node) Graffiti() [32]byte {
|
|
|
|
return n.graffiti
|
|
|
|
}
|