mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-10 04:01:51 +00:00
Fix Uint256 deserialization (#2786)
* Change base_fee_per_gas to Uint256 * Add custom (de)serialization to ExecutionPayload * Fix errors * Add a quoted_u256 module * Remove unused function * lint * Add test * Remove extra line Co-authored-by: Paul Hauner <paul@paulhauner.com>
This commit is contained in:
committed by
Paul Hauner
parent
de49c7ddaa
commit
24966c059d
@@ -1,7 +1,5 @@
|
||||
use bls::Hash256;
|
||||
use clap::ArgMatches;
|
||||
use clap_utils::{parse_optional, parse_required};
|
||||
use int_to_bytes::int_to_bytes32;
|
||||
use ssz::Encode;
|
||||
use std::fs::File;
|
||||
use std::io::Write;
|
||||
@@ -16,10 +14,7 @@ pub fn run<T: EthSpec>(matches: &ArgMatches) -> Result<(), String> {
|
||||
.map_err(|e| format!("Unable to get time: {:?}", e))?
|
||||
.as_secs(),
|
||||
);
|
||||
let base_fee_per_gas = Hash256::from_slice(&int_to_bytes32(parse_required(
|
||||
matches,
|
||||
"base-fee-per-gas",
|
||||
)?));
|
||||
let base_fee_per_gas = parse_required(matches, "base-fee-per-gas")?;
|
||||
let gas_limit = parse_required(matches, "gas-limit")?;
|
||||
let file_name = matches.value_of("file").ok_or("No file supplied")?;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user