mirror of
https://gitlab.com/pulsechaincom/prysm-pulse.git
synced 2025-01-15 06:28:20 +00:00
18fc17c903
* double_tree_changes * protoarray changes * beacon-chain changes * spec tests and debug rpc fixes * more conflicts * more conflicts * Terence's review Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
20 lines
530 B
Go
20 lines
530 B
Go
package debug
|
|
|
|
import (
|
|
"context"
|
|
|
|
"github.com/golang/protobuf/ptypes/empty"
|
|
pbrpc "github.com/prysmaticlabs/prysm/proto/prysm/v1alpha1"
|
|
)
|
|
|
|
// GetForkChoice returns a fork choice store.
|
|
func (ds *Server) GetForkChoice(_ context.Context, _ *empty.Empty) (*pbrpc.ForkChoiceResponse, error) {
|
|
store := ds.ForkFetcher.ForkChoicer()
|
|
|
|
return &pbrpc.ForkChoiceResponse{
|
|
JustifiedEpoch: store.JustifiedCheckpoint().Epoch,
|
|
FinalizedEpoch: store.FinalizedCheckpoint().Epoch,
|
|
ForkchoiceNodes: store.ForkChoiceNodes(),
|
|
}, nil
|
|
}
|