mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-20 13:24:44 +00:00
Fix block v3 reward encodings (#5049)
* Fix block v3 reward encodings * Use crates.io version
This commit is contained in:
@@ -511,13 +511,17 @@ impl<E: EthSpec> BeaconBlockResponseWrapper<E> {
|
||||
}
|
||||
}
|
||||
|
||||
pub fn consensus_block_value(&self) -> u64 {
|
||||
pub fn consensus_block_value_gwei(&self) -> u64 {
|
||||
match self {
|
||||
BeaconBlockResponseWrapper::Full(resp) => resp.consensus_block_value,
|
||||
BeaconBlockResponseWrapper::Blinded(resp) => resp.consensus_block_value,
|
||||
}
|
||||
}
|
||||
|
||||
pub fn consensus_block_value_wei(&self) -> Uint256 {
|
||||
Uint256::from(self.consensus_block_value_gwei()) * 1_000_000_000
|
||||
}
|
||||
|
||||
pub fn is_blinded(&self) -> bool {
|
||||
matches!(self, BeaconBlockResponseWrapper::Blinded(_))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user