mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
feat(sync): add tx hash number mapping (#417)
This commit is contained in:
@ -18,7 +18,7 @@ use crate::{
|
||||
};
|
||||
use reth_primitives::{
|
||||
Account, Address, BlockHash, BlockNumber, Header, IntegerList, Receipt, StorageEntry,
|
||||
TransactionSigned, TxNumber, H256,
|
||||
TransactionSigned, TxHash, TxNumber, H256,
|
||||
};
|
||||
|
||||
/// Enum for the types of tables present in libmdbx.
|
||||
@ -31,7 +31,7 @@ pub enum TableType {
|
||||
}
|
||||
|
||||
/// Default tables that should be present inside database.
|
||||
pub const TABLES: [(TableType, &str); 20] = [
|
||||
pub const TABLES: [(TableType, &str); 21] = [
|
||||
(TableType::Table, CanonicalHeaders::const_name()),
|
||||
(TableType::Table, HeaderTD::const_name()),
|
||||
(TableType::Table, HeaderNumbers::const_name()),
|
||||
@ -40,6 +40,7 @@ pub const TABLES: [(TableType, &str); 20] = [
|
||||
(TableType::Table, CumulativeTxCount::const_name()),
|
||||
(TableType::Table, NonCanonicalTransactions::const_name()),
|
||||
(TableType::Table, Transactions::const_name()),
|
||||
(TableType::Table, TxHashNumber::const_name()),
|
||||
(TableType::Table, Receipts::const_name()),
|
||||
(TableType::Table, Logs::const_name()),
|
||||
(TableType::Table, PlainAccountState::const_name()),
|
||||
@ -145,6 +146,11 @@ table!(
|
||||
( Transactions ) TxNumber | TransactionSigned
|
||||
);
|
||||
|
||||
table!(
|
||||
/// Stores the mapping of the transaction hash to the transaction number.
|
||||
( TxHashNumber ) TxHash | TxNumber
|
||||
);
|
||||
|
||||
table!(
|
||||
/// (Canonical only) Stores transaction receipts.
|
||||
( Receipts ) TxNumber | Receipt
|
||||
|
||||
Reference in New Issue
Block a user