fix(rpc): always include withdrawals in RPC (#1894)

This commit is contained in:
Matthias Seitz
2023-03-21 22:35:05 +01:00
committed by GitHub
parent f6a420fcfb
commit 02e78c4bd7
2 changed files with 16 additions and 1 deletions

View File

@ -155,7 +155,11 @@ where
let block = self.client.block(block_id).to_rpc_result()?;
let mut res = Vec::new();
if let Some(block) = block {
if let Some(mut block) = block {
// In RPC withdrawals are always present
if block.withdrawals.is_none() {
block.withdrawals = Some(vec![]);
}
block.encode(&mut res);
}