mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
fix: dont skip gas used ratio if empty (#5512)
Co-authored-by: evalir <hi@enriqueortiz.dev>
This commit is contained in:
@ -36,9 +36,8 @@ pub struct FeeHistory {
|
||||
///
|
||||
/// # Note
|
||||
///
|
||||
/// The `Option` is only for compatability with Erigon and Geth.
|
||||
#[serde(skip_serializing_if = "Vec::is_empty")]
|
||||
#[serde(default)]
|
||||
/// Empty list is skipped only for compatibility with Erigon and Geth.
|
||||
#[serde(default, skip_serializing_if = "Vec::is_empty")]
|
||||
pub base_fee_per_gas: Vec<U256>,
|
||||
/// An array of block gas used ratios. These are calculated as the ratio
|
||||
/// of `gasUsed` and `gasLimit`.
|
||||
@ -46,13 +45,11 @@ pub struct FeeHistory {
|
||||
/// # Note
|
||||
///
|
||||
/// The `Option` is only for compatability with Erigon and Geth.
|
||||
#[serde(skip_serializing_if = "Vec::is_empty")]
|
||||
#[serde(default)]
|
||||
pub gas_used_ratio: Vec<f64>,
|
||||
/// Lowest number block of the returned range.
|
||||
pub oldest_block: U256,
|
||||
/// An (optional) array of effective priority fee per gas data points from a single
|
||||
/// block. All zeroes are returned if the block is empty.
|
||||
#[serde(default)]
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub reward: Option<Vec<Vec<U256>>>,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user