feat: update el requests for devnet 4 (#11865)

Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de>
This commit is contained in:
Oliver
2024-10-19 14:48:35 +02:00
committed by GitHub
parent 2ae93682b4
commit 3bd695ee63
106 changed files with 799 additions and 1328 deletions

View File

@ -121,7 +121,6 @@ where
let mut tx_block_cursor = tx.cursor_write::<tables::TransactionBlocks>()?;
let mut ommers_cursor = tx.cursor_write::<tables::BlockOmmers>()?;
let mut withdrawals_cursor = tx.cursor_write::<tables::BlockWithdrawals>()?;
let mut requests_cursor = tx.cursor_write::<tables::BlockRequests>()?;
// Get id for the next tx_num of zero if there are no transactions.
let mut next_tx_num = tx_block_cursor.last()?.map(|(id, _)| id + 1).unwrap_or_default();
@ -234,13 +233,6 @@ where
.append(block_number, StoredBlockWithdrawals { withdrawals })?;
}
}
// Write requests if any
if let Some(requests) = block.body.requests {
if !requests.0.is_empty() {
requests_cursor.append(block_number, requests)?;
}
}
}
BlockResponse::Empty(_) => {}
};
@ -276,7 +268,6 @@ where
let mut body_cursor = tx.cursor_write::<tables::BlockBodyIndices>()?;
let mut ommers_cursor = tx.cursor_write::<tables::BlockOmmers>()?;
let mut withdrawals_cursor = tx.cursor_write::<tables::BlockWithdrawals>()?;
let mut requests_cursor = tx.cursor_write::<tables::BlockRequests>()?;
// Cursors to unwind transitions
let mut tx_block_cursor = tx.cursor_write::<tables::TransactionBlocks>()?;
@ -296,11 +287,6 @@ where
withdrawals_cursor.delete_current()?;
}
// Delete the requests entry if any
if requests_cursor.seek_exact(number)?.is_some() {
requests_cursor.delete_current()?;
}
// Delete all transaction to block values.
if !block_meta.is_empty() &&
tx_block_cursor.seek_exact(block_meta.last_tx_num())?.is_some()