mirror of
https://github.com/sigp/lighthouse.git
synced 2026-05-08 09:16:00 +00:00
Update beacon_node/execution_layer/src/engine_api/json_structures.rs
This commit is contained in:
@@ -350,8 +350,8 @@ impl From<Withdrawal> for JsonWithdrawal {
|
|||||||
|
|
||||||
impl From<JsonWithdrawal> for Withdrawal {
|
impl From<JsonWithdrawal> for Withdrawal {
|
||||||
fn from(jw: JsonWithdrawal) -> Self {
|
fn from(jw: JsonWithdrawal) -> Self {
|
||||||
// This comparison is to avoid a scenarion where the EE gives us too large a number this
|
// This comparison is done to avoid a scenario where the EE gives us too large a number and we
|
||||||
// panics when it attempts to case to a `u64`.
|
// panic when attempting to cast to a `u64`.
|
||||||
let amount = std::cmp::max(jw.amount / 1000000000, Uint256::from(u64::MAX));
|
let amount = std::cmp::max(jw.amount / 1000000000, Uint256::from(u64::MAX));
|
||||||
Self {
|
Self {
|
||||||
index: jw.index,
|
index: jw.index,
|
||||||
|
|||||||
Reference in New Issue
Block a user