Skip to content

Commit

Permalink
Add lamports=0 field to rewards
Browse files Browse the repository at this point in the history
  • Loading branch information
gagliardetto committed Aug 23, 2023
1 parent 6268deb commit 1a12294
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions multiepoch-getBlock.go
Original file line number Diff line number Diff line change
Expand Up @@ -301,6 +301,10 @@ func (multi *MultiEpoch) handleGetBlock(ctx context.Context, conn *requestContex
if asString, ok := rewardAsMap["commission"].(string); ok {
rewardAsMap["commission"] = asFloat(asString)
}
// if no lamports field, add it and set it to 0
if _, ok := rewardAsMap["lamports"]; !ok {
rewardAsMap["lamports"] = uint64(0)
}

// if it has a post_balance field, convert it to postBalance
if _, ok := rewardAsMap["post_balance"]; ok {
Expand Down

0 comments on commit 1a12294

Please sign in to comment.