mirror of
https://github.com/sigp/lighthouse.git
synced 2026-04-29 02:33:48 +00:00
Update op_pool to use proper rewards (#707)
* Update op_pool to use proper rewards * Fix missing use import for tests * Address Michael's comments * Revert to private ValidatorStatuses * Rename variable for clearer code * Fix update_cover function * Remove expect * Add WIP test for rewards * Use aggregation_bits instead of earliest_attestation_validators * Use earliest attestation in test and correct typo * Fix op_pool test thanks to @michaelsproul 's help * Change test name
This commit is contained in:
@@ -10,6 +10,7 @@ use crate::persisted_beacon_chain::{PersistedBeaconChain, BEACON_CHAIN_DB_KEY};
|
||||
use crate::timeout_rw_lock::TimeoutRwLock;
|
||||
use lmd_ghost::LmdGhost;
|
||||
use operation_pool::{OperationPool, PersistedOperationPool};
|
||||
use parking_lot::RwLock;
|
||||
use slog::{debug, error, info, trace, warn, Logger};
|
||||
use slot_clock::SlotClock;
|
||||
use ssz::Encode;
|
||||
@@ -1514,7 +1515,11 @@ impl<T: BeaconChainTypes> BeaconChain<T> {
|
||||
graffiti,
|
||||
proposer_slashings: proposer_slashings.into(),
|
||||
attester_slashings: attester_slashings.into(),
|
||||
attestations: self.op_pool.get_attestations(&state, &self.spec).into(),
|
||||
attestations: self
|
||||
.op_pool
|
||||
.get_attestations(&state, &self.spec)
|
||||
.map_err(BlockProductionError::OpPoolError)?
|
||||
.into(),
|
||||
deposits,
|
||||
voluntary_exits: self.op_pool.get_voluntary_exits(&state, &self.spec).into(),
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user