mirror of
https://github.com/OffchainLabs/prysm.git
synced 2026-01-09 21:38:05 -05:00
* Report voted fractions for a given root * unused parameters * comment update * change test Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
51 lines
1022 B
Go
51 lines
1022 B
Go
package protoarray
|
|
|
|
import (
|
|
types "github.com/prysmaticlabs/prysm/v3/consensus-types/primitives"
|
|
)
|
|
|
|
// Slot of the fork choice node.
|
|
func (n *Node) Slot() types.Slot {
|
|
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.
|
|
func (n *Node) JustifiedEpoch() types.Epoch {
|
|
return n.justifiedEpoch
|
|
}
|
|
|
|
// FinalizedEpoch of the fork choice node.
|
|
func (n *Node) FinalizedEpoch() types.Epoch {
|
|
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
|
|
}
|
|
|
|
// VotedFraction is not implemented for protoarray
|
|
func (*ForkChoice) VotedFraction(_ [32]byte) (uint64, error) {
|
|
return 0, nil
|
|
}
|