mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
feat(examples): sqlite rollup exex (#7826)
This commit is contained in:
@ -49,7 +49,7 @@ pub struct Block {
|
||||
}
|
||||
|
||||
impl Block {
|
||||
/// Create SealedBLock that will create all header hashes.
|
||||
/// Calculate the header hash and seal the block so that it can't be changed.
|
||||
pub fn seal_slow(self) -> SealedBlock {
|
||||
SealedBlock {
|
||||
header: self.header.seal_slow(),
|
||||
@ -175,7 +175,7 @@ impl TryFrom<reth_rpc_types::Block> for Block {
|
||||
.collect(),
|
||||
reth_rpc_types::BlockTransactions::Hashes(_) |
|
||||
reth_rpc_types::BlockTransactions::Uncle => {
|
||||
return Err(ConversionError::MissingFullTransactions);
|
||||
return Err(ConversionError::MissingFullTransactions)
|
||||
}
|
||||
};
|
||||
transactions?
|
||||
@ -214,6 +214,12 @@ impl BlockWithSenders {
|
||||
SealedBlockWithSenders { block: block.seal(hash), senders }
|
||||
}
|
||||
|
||||
/// Calculate the header hash and seal the block with senders so that it can't be changed.
|
||||
#[inline]
|
||||
pub fn seal_slow(self) -> SealedBlockWithSenders {
|
||||
SealedBlockWithSenders { block: self.block.seal_slow(), senders: self.senders }
|
||||
}
|
||||
|
||||
/// Split Structure to its components
|
||||
#[inline]
|
||||
pub fn into_components(self) -> (Block, Vec<Address>) {
|
||||
@ -456,7 +462,7 @@ impl std::ops::DerefMut for SealedBlock {
|
||||
}
|
||||
|
||||
/// Sealed block with senders recovered from transactions.
|
||||
#[derive(Debug, Clone, PartialEq, Eq, Default)]
|
||||
#[derive(Debug, Clone, PartialEq, Eq, Default, Serialize, Deserialize)]
|
||||
pub struct SealedBlockWithSenders {
|
||||
/// Sealed block
|
||||
pub block: SealedBlock,
|
||||
|
||||
@ -10,4 +10,4 @@ pub use bundle_state_with_receipts::{
|
||||
};
|
||||
pub use hashed_state_changes::HashedStateChanges;
|
||||
pub use state_changes::StateChanges;
|
||||
pub use state_reverts::StateReverts;
|
||||
pub use state_reverts::{StateReverts, StorageRevertsIter};
|
||||
|
||||
@ -108,7 +108,8 @@ impl StateReverts {
|
||||
|
||||
/// Iterator over storage reverts.
|
||||
/// See [StorageRevertsIter::next] for more details.
|
||||
struct StorageRevertsIter<R: Iterator, W: Iterator> {
|
||||
#[allow(missing_debug_implementations)]
|
||||
pub struct StorageRevertsIter<R: Iterator, W: Iterator> {
|
||||
reverts: Peekable<R>,
|
||||
wiped: Peekable<W>,
|
||||
}
|
||||
@ -118,7 +119,8 @@ where
|
||||
R: Iterator<Item = (B256, RevertToSlot)>,
|
||||
W: Iterator<Item = (B256, U256)>,
|
||||
{
|
||||
fn new(
|
||||
/// Create a new iterator over storage reverts.
|
||||
pub fn new(
|
||||
reverts: impl IntoIterator<IntoIter = R>,
|
||||
wiped: impl IntoIterator<IntoIter = W>,
|
||||
) -> Self {
|
||||
|
||||
Reference in New Issue
Block a user