lighthouse/beacon_node/beacon_chain
Jimmy Chen b5337c0ea5 Fix incorrect ideal rewards calculation (#4520)
## Issue Addressed

The PR fixes a bug where the the ideal rewards for source and head were incorrectly set.

Output from testing a validator that performed optimally in a Phase 0 epoch , note the `source` and `target` under ideal rewards is incorrect (compared to the actual `total_rewards` below):

```json
{ 
   "ideal_rewards": [
    ...
      {
        "effective_balance": "32000000000",
        "head": "18771",
        "target": "18770",
        "source": "18729",
        "inclusion_delay": "17083",
        "inactivity": "0"
      }
    ],
    "total_rewards": [
      {
        "validator_index": "0",
        "head": "18729",
        "target": "18770",
        "source": "18771",
        "inclusion_delay": "17083",
        "inactivity": "0"
      }
    ]
```
2023-07-31 01:53:06 +00:00
..
src Fix incorrect ideal rewards calculation (#4520) 2023-07-31 01:53:06 +00:00
tests Phase 0 attestation rewards via Beacon API (#4474) 2023-07-18 01:48:40 +00:00
Cargo.toml Phase 0 attestation rewards via Beacon API (#4474) 2023-07-18 01:48:40 +00:00