mirror of
https://github.com/logos-blockchain/logos-blockchain-pocs.git
synced 2026-01-02 13:13:09 +00:00
Hardcode block type to be Ethereum
This commit is contained in:
parent
92e85310bc
commit
da4d7c12e2
@ -1,14 +1,13 @@
|
||||
use reth_ethereum::Block;
|
||||
|
||||
// TODO: The logic to batch multiple of these blocks (or the transactions within them) and send them to DA and generate proofs is still missing. It will have to be added at the offsite.
|
||||
// This type does not support any recovery mechanism, so if the node is stopped, the state DB should be cleaned before starting again. The folder is specified by the `--datadir` option in the binary.
|
||||
#[derive(Default)]
|
||||
pub struct Aggregator<Block> {
|
||||
pub struct Aggregator {
|
||||
unprocessed_blocks: Vec<Block>,
|
||||
}
|
||||
|
||||
impl<Block> Aggregator<Block>
|
||||
where
|
||||
Block: reth_ethereum::primitives::Block,
|
||||
{
|
||||
impl Aggregator {
|
||||
pub fn process_blocks(&mut self, new_blocks: impl Iterator<Item = Block>) {
|
||||
self.unprocessed_blocks.extend(new_blocks);
|
||||
}
|
||||
|
||||
@ -10,13 +10,14 @@ use reth_ethereum::{
|
||||
};
|
||||
use reth_tracing::tracing::info;
|
||||
|
||||
pub type Block<Node> =
|
||||
<<<Node as FullNodeTypes>::Types as NodeTypes>::Primitives as NodePrimitives>::Block;
|
||||
|
||||
async fn aggregate_block_txs<Node: FullNodeComponents>(
|
||||
mut ctx: ExExContext<Node>,
|
||||
mut aggregator: Aggregator<Block<Node>>,
|
||||
) -> eyre::Result<()> {
|
||||
mut aggregator: Aggregator,
|
||||
) -> eyre::Result<()>
|
||||
where
|
||||
<<Node as FullNodeTypes>::Types as NodeTypes>::Primitives:
|
||||
NodePrimitives<Block = reth_ethereum::Block>,
|
||||
{
|
||||
while let Some(notification) = ctx.notifications.try_next().await? {
|
||||
let ExExNotification::ChainCommitted { new } = ¬ification else {
|
||||
continue;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user