diff --git a/ethers-core/src/types/txpool.rs b/ethers-core/src/types/txpool.rs index 5f6ce423..93d7b75e 100644 --- a/ethers-core/src/types/txpool.rs +++ b/ethers-core/src/types/txpool.rs @@ -7,7 +7,7 @@ use serde::{ use std::{collections::BTreeMap, fmt, str::FromStr}; /// Transaction summary as found in the Txpool Inspection property. -#[derive(Debug, Clone, PartialEq, Eq, Serialize)] +#[derive(Debug, Clone, PartialEq, Eq)] pub struct TxpoolInspectSummary { /// Recipient (None when contract creation) pub to: Option
, @@ -83,6 +83,24 @@ impl<'de> Deserialize<'de> for TxpoolInspectSummary { } } +/// Implement the `Serialize` trait for `TxpoolInspectSummary` struct so that the +/// format matches the one from geth. +impl Serialize for TxpoolInspectSummary { + fn serialize