Fix Withdrawal serialisation and check address change fork (#3789)

* Disallow address changes before Capella

* Quote u64s in Withdrawal serialisation
This commit is contained in:
Michael Sproul
2022-12-13 17:03:21 +11:00
committed by GitHub
parent f7a54afde5
commit 173a0abab4
3 changed files with 10 additions and 0 deletions

View File

@@ -12,8 +12,10 @@ use tree_hash_derive::TreeHash;
pub struct Withdrawal {
#[serde(with = "eth2_serde_utils::quoted_u64")]
pub index: u64,
#[serde(with = "eth2_serde_utils::quoted_u64")]
pub validator_index: u64,
pub address: Address,
#[serde(with = "eth2_serde_utils::quoted_u64")]
pub amount: u64,
}