Skip to content

Commit

Permalink
fixed invalid proposers for orphaned blocks
Browse files Browse the repository at this point in the history
  • Loading branch information
pk910 committed Sep 5, 2023
1 parent 4999807 commit 93b45ba
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion db/db.go
Original file line number Diff line number Diff line change
Expand Up @@ -520,7 +520,7 @@ func GetBlocksByParentRoot(parentRoot []byte) []*dbtypes.Block {
func GetFilteredBlocks(filter *dbtypes.BlockFilter, firstSlot uint64, offset uint64, limit uint32) []*dbtypes.AssignedBlock {
blockAssignments := []*dbtypes.AssignedBlock{}
var sql strings.Builder
fmt.Fprintf(&sql, `SELECT slot_assignments.slot, slot_assignments.proposer`)
fmt.Fprintf(&sql, `SELECT slot_assignments.slot, COALESCE(blocks.proposer, slot_assignments.proposer) AS proposer`)
blockFields := []string{
"root", "slot", "parent_root", "state_root", "orphaned", "proposer", "graffiti", "graffiti_text",
"attestation_count", "deposit_count", "exit_count", "withdraw_count", "withdraw_amount", "attester_slashing_count",
Expand Down

0 comments on commit 93b45ba

Please sign in to comment.