mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
feat: A basic json dump extension to reth db list. (#2232)
Co-authored-by: andy-thomason <andy@atomicinrement.com> Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de>
This commit is contained in:
@ -5,6 +5,7 @@ use crate::{
|
||||
Error,
|
||||
};
|
||||
use reth_primitives::BlockNumber;
|
||||
use serde::Serialize;
|
||||
|
||||
/// Number of indices in one shard.
|
||||
pub const NUM_OF_INDICES_IN_SHARD: usize = 100;
|
||||
@ -15,7 +16,7 @@ pub const NUM_OF_INDICES_IN_SHARD: usize = 100;
|
||||
/// `Address | 200` -> data is from block 0 to 200.
|
||||
///
|
||||
/// `Address | 300` -> data is from block 201 to 300.
|
||||
#[derive(Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd)]
|
||||
#[derive(Debug, Default, Clone, Eq, PartialEq, Ord, PartialOrd, Serialize)]
|
||||
pub struct ShardedKey<T> {
|
||||
/// The key for this type.
|
||||
pub key: T,
|
||||
|
||||
@ -4,7 +4,9 @@ use crate::{
|
||||
table::{Decode, Encode},
|
||||
Error,
|
||||
};
|
||||
|
||||
use reth_primitives::{BlockNumber, H160, H256};
|
||||
use serde::Serialize;
|
||||
|
||||
use super::ShardedKey;
|
||||
|
||||
@ -17,7 +19,7 @@ pub const NUM_OF_INDICES_IN_SHARD: usize = 100;
|
||||
/// `Address | Storagekey | 200` -> data is from transition 0 to 200.
|
||||
///
|
||||
/// `Address | StorageKey | 300` -> data is from transition 201 to 300.
|
||||
#[derive(Debug, Default, Clone, Eq, Ord, PartialOrd, PartialEq)]
|
||||
#[derive(Debug, Default, Clone, Eq, Ord, PartialOrd, PartialEq, Serialize)]
|
||||
pub struct StorageShardedKey {
|
||||
/// Storage account address.
|
||||
pub address: H160,
|
||||
|
||||
Reference in New Issue
Block a user