github.com/prysmaticlabs/prysm@v1.4.4/beacon-chain/forkchoice/protoarray/node.go (about)

     1  package protoarray
     2  
     3  import (
     4  	types "github.com/prysmaticlabs/eth2-types"
     5  )
     6  
     7  // Slot of the fork choice node.
     8  func (n *Node) Slot() types.Slot {
     9  	return n.slot
    10  }
    11  
    12  // Root of the fork choice node.
    13  func (n *Node) Root() [32]byte {
    14  	return n.root
    15  }
    16  
    17  // Parent of the fork choice node.
    18  func (n *Node) Parent() uint64 {
    19  	return n.parent
    20  }
    21  
    22  // JustifiedEpoch of the fork choice node.
    23  func (n *Node) JustifiedEpoch() types.Epoch {
    24  	return n.justifiedEpoch
    25  }
    26  
    27  // FinalizedEpoch of the fork choice node.
    28  func (n *Node) FinalizedEpoch() types.Epoch {
    29  	return n.finalizedEpoch
    30  }
    31  
    32  // Weight of the fork choice node.
    33  func (n *Node) Weight() uint64 {
    34  	return n.weight
    35  }
    36  
    37  // BestChild of the fork choice node.
    38  func (n *Node) BestChild() uint64 {
    39  	return n.bestChild
    40  }
    41  
    42  // BestDescendant of the fork choice node.
    43  func (n *Node) BestDescendant() uint64 {
    44  	return n.bestDescendant
    45  }
    46  
    47  // Graffiti of the fork choice node.
    48  func (n *Node) Graffiti() [32]byte {
    49  	return n.graffiti
    50  }