fix: Fix typos (#773)

This commit is contained in:
Dimitris Apostolou
2023-01-09 02:43:51 +02:00
committed by GitHub
parent a9ff1dea0d
commit 31cb66902e
33 changed files with 91 additions and 91 deletions

View File

@ -187,7 +187,7 @@ pub enum ForkSpec {
Constantinople, // SKIPPED Constantinople, // SKIPPED
/// Constantinople fix /// Constantinople fix
ConstantinopleFix, ConstantinopleFix,
/// Instanbul /// Istanbul
Istanbul, Istanbul,
/// Berlin /// Berlin
Berlin, Berlin,
@ -236,7 +236,7 @@ impl From<ForkSpec> for reth_executor::SpecUpgrades {
panic!("Not supported") panic!("Not supported")
} }
ForkSpec::ByzantiumToConstantinopleAt5 | ForkSpec::Constantinople => { ForkSpec::ByzantiumToConstantinopleAt5 | ForkSpec::Constantinople => {
panic!("Overriden with PETERSBURG") panic!("Overridden with PETERSBURG")
} }
} }
} }
@ -473,6 +473,6 @@ mod test {
]"#; ]"#;
let res = serde_json::from_str::<Vec<Transaction>>(test); let res = serde_json::from_str::<Vec<Transaction>>(test);
assert!(res.is_ok(), "Failed to deserialize transactin with error: {res:?}"); assert!(res.is_ok(), "Failed to deserialize transaction with error: {res:?}");
} }
} }

View File

@ -31,7 +31,7 @@ pub fn validate_header_standalone(
return Err(Error::TimestampIsInFuture { timestamp: header.timestamp, present_timestamp }) return Err(Error::TimestampIsInFuture { timestamp: header.timestamp, present_timestamp })
} }
// From yellow papper: extraData: An arbitrary byte array containing data // From yellow paper: extraData: An arbitrary byte array containing data
// relevant to this block. This must be 32 bytes or fewer; formally Hx. // relevant to this block. This must be 32 bytes or fewer; formally Hx.
if header.extra_data.len() > 32 { if header.extra_data.len() > 32 {
return Err(Error::ExtraDataExceedsMax { len: header.extra_data.len() }) return Err(Error::ExtraDataExceedsMax { len: header.extra_data.len() })
@ -124,7 +124,7 @@ pub fn validate_transaction_regarding_header(
Ok(()) Ok(())
} }
/// Iterate over all transactions, verify them agains each other and against the block. /// Iterate over all transactions, verify them against each other and against the block.
/// There is no gas check done as [REVM](https://github.com/bluealloy/revm/blob/fd0108381799662098b7ab2c429ea719d6dfbf28/crates/revm/src/evm_impl.rs#L113-L131) already checks that. /// There is no gas check done as [REVM](https://github.com/bluealloy/revm/blob/fd0108381799662098b7ab2c429ea719d6dfbf28/crates/revm/src/evm_impl.rs#L113-L131) already checks that.
pub fn validate_all_transaction_regarding_block_and_nonces< pub fn validate_all_transaction_regarding_block_and_nonces<
'a, 'a,
@ -155,7 +155,7 @@ pub fn validate_all_transaction_regarding_block_and_nonces<
} }
Entry::Vacant(entry) => { Entry::Vacant(entry) => {
let account = provider.basic_account(transaction.signer())?.unwrap_or_default(); let account = provider.basic_account(transaction.signer())?.unwrap_or_default();
// Signer account shoudn't have bytecode. Presence of bytecode means this is a // Signer account shouldn't have bytecode. Presence of bytecode means this is a
// smartcontract. // smartcontract.
if account.has_bytecode() { if account.has_bytecode() {
return Err(Error::SignerAccountHasBytecode.into()) return Err(Error::SignerAccountHasBytecode.into())

View File

@ -89,7 +89,7 @@ impl AccountInfoChangeSet {
} }
} }
/// Diff change set that is neede for creating history index and updating current world state. /// Diff change set that is needed for creating history index and updating current world state.
#[derive(Debug, Clone)] #[derive(Debug, Clone)]
pub struct AccountChangeSet { pub struct AccountChangeSet {
/// Old and New account account change. /// Old and New account account change.
@ -107,7 +107,7 @@ pub struct AccountChangeSet {
/// and block reward if present /// and block reward if present
#[derive(Debug)] #[derive(Debug)]
pub struct ExecutionResult { pub struct ExecutionResult {
/// Transaction changeest contraining [Receipt], changed [Accounts][Account] and Storages. /// Transaction changeset containing [Receipt], changed [Accounts][Account] and Storages.
pub changesets: Vec<TransactionChangeSet>, pub changesets: Vec<TransactionChangeSet>,
/// Block reward if present. It represent changeset for block reward slot in /// Block reward if present. It represent changeset for block reward slot in
/// [tables::AccountChangeSet] . /// [tables::AccountChangeSet] .
@ -135,7 +135,7 @@ pub fn commit_changes<DB: StateProvider>(
let db_account = match db.accounts.entry(address) { let db_account = match db.accounts.entry(address) {
Entry::Occupied(entry) => entry.into_mut(), Entry::Occupied(entry) => entry.into_mut(),
Entry::Vacant(_entry) => { Entry::Vacant(_entry) => {
panic!("Left panic to critically jumpout if happens, as every account shound be hot loaded."); panic!("Left panic to critically jumpout if happens, as every account should be hot loaded.");
} }
}; };
// Insert into `change` a old account and None for new account // Insert into `change` a old account and None for new account
@ -185,7 +185,7 @@ pub fn commit_changes<DB: StateProvider>(
Entry::Occupied(entry) => { Entry::Occupied(entry) => {
let entry = entry.into_mut(); let entry = entry.into_mut();
// account is present inside cache but is markes as NotExisting. // account is present inside cache but is marked as NotExisting.
let account_changeset = let account_changeset =
if matches!(entry.account_state, AccountState::NotExisting) { if matches!(entry.account_state, AccountState::NotExisting) {
AccountInfoChangeSet::Created { new: to_reth_acc(&account.info) } AccountInfoChangeSet::Created { new: to_reth_acc(&account.info) }
@ -616,7 +616,7 @@ mod tests {
assert_eq!( assert_eq!(
changesets.changeset.get(&account2).unwrap().account, changesets.changeset.get(&account2).unwrap().account,
AccountInfoChangeSet::Created { new: account2_info }, AccountInfoChangeSet::Created { new: account2_info },
"New acccount" "New account"
); );
assert_eq!( assert_eq!(
changesets.changeset.get(&account3).unwrap().account, changesets.changeset.get(&account3).unwrap().account,

View File

@ -70,7 +70,7 @@ pub enum Error {
TransactionPriorityFeeMoreThenMaxFee, TransactionPriorityFeeMoreThenMaxFee,
#[error("Transaction chain_id does not match.")] #[error("Transaction chain_id does not match.")]
TransactionChainId, TransactionChainId,
#[error("Transation max fee is less them block base fee.")] #[error("Transaction max fee is less them block base fee.")]
TransactionMaxFeeLessThenBaseFee, TransactionMaxFeeLessThenBaseFee,
#[error("Transaction signer does not have account.")] #[error("Transaction signer does not have account.")]
SignerAccountNotExisting, SignerAccountNotExisting,

View File

@ -13,7 +13,7 @@ pub enum Error {
/// Failed to get a value into a table. /// Failed to get a value into a table.
#[error("Database read error code: {0:?}")] #[error("Database read error code: {0:?}")]
Read(u32), Read(u32),
/// Failed to delete a `(key, vakue)` pair into a table. /// Failed to delete a `(key, value)` pair into a table.
#[error("Database delete error code: {0:?}")] #[error("Database delete error code: {0:?}")]
Delete(u32), Delete(u32),
/// Failed to commit transaction changes into the database. /// Failed to commit transaction changes into the database.

View File

@ -162,7 +162,7 @@ impl TestHeadersClient {
lock.extend(headers); lock.extend(headers);
} }
/// Set repsonse error /// Set response error
pub async fn set_error(&self, err: RequestError) { pub async fn set_error(&self, err: RequestError) {
let mut lock = self.error.lock().await; let mut lock = self.error.lock().await;
lock.replace(err); lock.replace(err);

View File

@ -37,7 +37,7 @@ mod with_attrs;
/// #[metric(rename = "second_gauge", describe = "A gauge with metric attribute description.")] /// #[metric(rename = "second_gauge", describe = "A gauge with metric attribute description.")]
/// gauge2: Gauge, /// gauge2: Gauge,
/// /// Some doc comment /// /// Some doc comment
/// #[metric(describe = "Metric attribute description will be preffered over doc comment.")] /// #[metric(describe = "Metric attribute description will be preferred over doc comment.")]
/// counter: Counter, /// counter: Counter,
/// /// A renamed histogram. /// /// A renamed histogram.
/// #[metric(rename = "histogram")] /// #[metric(rename = "histogram")]
@ -79,7 +79,7 @@ mod with_attrs;
/// pub fn describe() { /// pub fn describe() {
/// metrics::describe_gauge!("metrics_custom_gauge", "A gauge with doc comment description."); /// metrics::describe_gauge!("metrics_custom_gauge", "A gauge with doc comment description.");
/// metrics::describe_gauge!("metrics_custom_second_gauge", "A gauge with metric attribute description."); /// metrics::describe_gauge!("metrics_custom_second_gauge", "A gauge with metric attribute description.");
/// metrics::describe_counter!("metrics_custom_counter", "Metric attribute description will be preffered over doc comment."); /// metrics::describe_counter!("metrics_custom_counter", "Metric attribute description will be preferred over doc comment.");
/// metrics::describe_histogram!("metrics_custom_histogram", "A renamed histogram."); /// metrics::describe_histogram!("metrics_custom_histogram", "A renamed histogram.");
/// } /// }
/// } /// }

View File

@ -15,7 +15,7 @@ struct CustomMetrics {
#[metric(rename = "second_gauge", describe = "A gauge with metric attribute description.")] #[metric(rename = "second_gauge", describe = "A gauge with metric attribute description.")]
gauge2: Gauge, gauge2: Gauge,
/// Some doc comment /// Some doc comment
#[metric(describe = "Metric attribute description will be preffered over doc comment.")] #[metric(describe = "Metric attribute description will be preferred over doc comment.")]
counter: Counter, counter: Counter,
/// A renamed histogram. /// A renamed histogram.
#[metric(rename = "histogram")] #[metric(rename = "histogram")]
@ -60,7 +60,7 @@ fn describe_metrics() {
TestMetric { TestMetric {
ty: TestMetricTy::Counter, ty: TestMetricTy::Counter,
description: Some( description: Some(
"Metric attribute description will be preffered over doc comment.".to_owned() "Metric attribute description will be preferred over doc comment.".to_owned()
) )
} }
); );

View File

@ -5,7 +5,7 @@ edition = "2021"
license = "Apache-2.0" license = "Apache-2.0"
repository = "https://github.com/paradigmxyz/reth" repository = "https://github.com/paradigmxyz/reth"
description = """ description = """
Types shared accross network code Types shared across network code
""" """
[dependencies] [dependencies]

View File

@ -64,7 +64,7 @@ pub enum ECIESErrorImpl {
/// Error when decoding RLP data /// Error when decoding RLP data
#[error(transparent)] #[error(transparent)]
RLPDecoding(reth_rlp::DecodeError), RLPDecoding(reth_rlp::DecodeError),
/// Error when convering to integer /// Error when converting to integer
#[error(transparent)] #[error(transparent)]
FromInt(std::num::TryFromIntError), FromInt(std::num::TryFromIntError),
/// Error when trying to split an array beyond its length /// Error when trying to split an array beyond its length

View File

@ -1,6 +1,6 @@
[package] [package]
name = "reth-eth-wire" name = "reth-eth-wire"
description = "Impements the eth/64 and eth/65 P2P protocols" description = "Implements the eth/64 and eth/65 P2P protocols"
version = "0.1.0" version = "0.1.0"
edition = "2021" edition = "2021"
license = "MIT OR Apache-2.0" license = "MIT OR Apache-2.0"

View File

@ -71,7 +71,7 @@ impl StateFetcher {
/// ///
/// Invoked when an active session was closed. /// Invoked when an active session was closed.
/// ///
/// This cancels als inflight request and sends an error to the receiver. /// This cancels also inflight request and sends an error to the receiver.
pub(crate) fn on_session_closed(&mut self, peer: &PeerId) { pub(crate) fn on_session_closed(&mut self, peer: &PeerId) {
self.peers.remove(peer); self.peers.remove(peer);
if let Some(req) = self.inflight_headers_requests.remove(peer) { if let Some(req) = self.inflight_headers_requests.remove(peer) {

View File

@ -255,7 +255,7 @@ struct NetworkInner {
pub(crate) enum NetworkHandleMessage { pub(crate) enum NetworkHandleMessage {
/// Adds an address for a peer. /// Adds an address for a peer.
AddPeerAddress(PeerId, PeerKind, SocketAddr), AddPeerAddress(PeerId, PeerKind, SocketAddr),
/// Removes a peer from the peerset correponding to the given kind. /// Removes a peer from the peerset corresponding to the given kind.
RemovePeer(PeerId, PeerKind), RemovePeer(PeerId, PeerKind),
/// Disconnect a connection to a peer if it exists. /// Disconnect a connection to a peer if it exists.
DisconnectPeer(PeerId, Option<DisconnectReason>), DisconnectPeer(PeerId, Option<DisconnectReason>),
@ -280,7 +280,7 @@ pub(crate) enum NetworkHandleMessage {
FetchClient(oneshot::Sender<FetchClient>), FetchClient(oneshot::Sender<FetchClient>),
/// Apply a status update. /// Apply a status update.
StatusUpdate { height: u64, hash: H256, total_difficulty: U256 }, StatusUpdate { height: u64, hash: H256, total_difficulty: U256 },
/// Get PeerInfo fro all the peers /// Get PeerInfo from all the peers
GetPeerInfo(oneshot::Sender<Vec<PeerInfo>>), GetPeerInfo(oneshot::Sender<Vec<PeerInfo>>),
/// Get PeerInfo for a specific peer /// Get PeerInfo for a specific peer
GetPeerInfoById(PeerId, oneshot::Sender<Option<PeerInfo>>), GetPeerInfoById(PeerId, oneshot::Sender<Option<PeerInfo>>),

View File

@ -29,7 +29,7 @@ impl Default for SessionsConfig {
// since the manager is the sender. // since the manager is the sender.
session_command_buffer: 32, session_command_buffer: 32,
// This should be greater since the manager is the receiver. The total size will be // This should be greater since the manager is the receiver. The total size will be
// `buffer + num sessions`. Each session can therefor fit at least 1 message in the // `buffer + num sessions`. Each session can therefore fit at least 1 message in the
// channel. The buffer size is additional capacity. The channel is always drained on // channel. The buffer size is additional capacity. The channel is always drained on
// `poll`. // `poll`.
session_event_buffer: 64, session_event_buffer: 64,

View File

@ -29,7 +29,7 @@ pub struct Transaction {
pub from: Address, pub from: Address,
/// Recipient /// Recipient
pub to: Option<Address>, pub to: Option<Address>,
/// Transfered value /// Transferred value
pub value: U256, pub value: U256,
/// Gas Price /// Gas Price
#[serde(skip_serializing_if = "Option::is_none")] #[serde(skip_serializing_if = "Option::is_none")]

View File

@ -474,7 +474,7 @@ mod tests {
"Post changed of a account" "Post changed of a account"
); );
// assert storage // assert storage
// Get on dupsort would return only first value. This is good enought for this test. // Get on dupsort would return only first value. This is good enough for this test.
assert_eq!( assert_eq!(
tx.get::<tables::PlainStorageState>(account1), tx.get::<tables::PlainStorageState>(account1),
Ok(Some(StorageEntry { key: H256::from_low_u64_be(1), value: U256::from(2) })), Ok(Some(StorageEntry { key: H256::from_low_u64_be(1), value: U256::from(2) })),

View File

@ -408,7 +408,7 @@ mod tests {
// Checkpoint and no gap // Checkpoint and no gap
tx.put::<tables::CanonicalHeaders>(head.number, head.hash()) tx.put::<tables::CanonicalHeaders>(head.number, head.hash())
.expect("falied to write canonical"); .expect("failed to write canonical");
tx.put::<tables::Headers>(head.num_hash().into(), head.clone().unseal()) tx.put::<tables::Headers>(head.num_hash().into(), head.clone().unseal())
.expect("failed to write header"); .expect("failed to write header");
assert_matches!( assert_matches!(
@ -418,7 +418,7 @@ mod tests {
// Checkpoint and gap // Checkpoint and gap
tx.put::<tables::CanonicalHeaders>(gap_tip.number, gap_tip.hash()) tx.put::<tables::CanonicalHeaders>(gap_tip.number, gap_tip.hash())
.expect("falied to write canonical"); .expect("failed to write canonical");
tx.put::<tables::Headers>(gap_tip.num_hash().into(), gap_tip.clone().unseal()) tx.put::<tables::Headers>(gap_tip.num_hash().into(), gap_tip.clone().unseal())
.expect("failed to write header"); .expect("failed to write header");
assert_matches!( assert_matches!(
@ -428,7 +428,7 @@ mod tests {
// Checkpoint and gap closed // Checkpoint and gap closed
tx.put::<tables::CanonicalHeaders>(gap_fill.number, gap_fill.hash()) tx.put::<tables::CanonicalHeaders>(gap_fill.number, gap_fill.hash())
.expect("falied to write canonical"); .expect("failed to write canonical");
tx.put::<tables::Headers>(gap_fill.num_hash().into(), gap_fill.clone().unseal()) tx.put::<tables::Headers>(gap_fill.num_hash().into(), gap_fill.clone().unseal())
.expect("failed to write header"); .expect("failed to write header");
assert_matches!( assert_matches!(

View File

@ -7,9 +7,9 @@ use crate::{db::Transaction, ExecInput, ExecOutput, Stage, StageError, UnwindInp
#[derive(thiserror::Error, Debug)] #[derive(thiserror::Error, Debug)]
pub(crate) enum TestRunnerError { pub(crate) enum TestRunnerError {
#[error("Database error occured.")] #[error("Database error occurred.")]
Database(#[from] reth_interfaces::db::Error), Database(#[from] reth_interfaces::db::Error),
#[error("Internal runner error occured.")] #[error("Internal runner error occurred.")]
Internal(#[from] Box<dyn std::error::Error>), Internal(#[from] Box<dyn std::error::Error>),
} }

View File

@ -1,4 +1,4 @@
/// Commont return types /// Common return types
pub mod common; pub mod common;
/// Cursor database traits. /// Cursor database traits.
pub mod cursor; pub mod cursor;

View File

@ -6,7 +6,7 @@
# #
################################################################################ ################################################################################
# #
# Basic internal definitios. For a customizable variables and options see below. # Basic internal definitions. For a customizable variables and options see below.
# #
$(info // The GNU Make $(MAKE_VERSION)) $(info // The GNU Make $(MAKE_VERSION))
SHELL := $(shell env bash -c 'echo $$BASH') SHELL := $(shell env bash -c 'echo $$BASH')

View File

@ -36,7 +36,7 @@
/** Disables using GNU/Linux libc extensions. /** Disables using GNU/Linux libc extensions.
* \ingroup build_option * \ingroup build_option
* \note This option couldn't be moved to the options.h since dependant * \note This option couldn't be moved to the options.h since dependent
* control macros/defined should be prepared before include the options.h */ * control macros/defined should be prepared before include the options.h */
#ifndef MDBX_DISABLE_GNU_SOURCE #ifndef MDBX_DISABLE_GNU_SOURCE
#define MDBX_DISABLE_GNU_SOURCE 0 #define MDBX_DISABLE_GNU_SOURCE 0
@ -1654,7 +1654,7 @@ MDBX_INTERNAL_FUNC int osal_lck_destroy(MDBX_env *env,
MDBX_INTERNAL_FUNC int osal_lck_seize(MDBX_env *env); MDBX_INTERNAL_FUNC int osal_lck_seize(MDBX_env *env);
/// \brief Downgrades the level of initially acquired lock to /// \brief Downgrades the level of initially acquired lock to
/// operational level specified by argument. The reson for such downgrade: /// operational level specified by argument. The reason for such downgrade:
/// - unblocking of other processes that are waiting for access, i.e. /// - unblocking of other processes that are waiting for access, i.e.
/// if (env->me_flags & MDBX_EXCLUSIVE) != 0, then other processes /// if (env->me_flags & MDBX_EXCLUSIVE) != 0, then other processes
/// should be made aware that access is unavailable rather than /// should be made aware that access is unavailable rather than
@ -2037,7 +2037,7 @@ extern LIBMDBX_API const char *const mdbx_sourcery_anchor;
/** Controls sort order of internal page number lists. /** Controls sort order of internal page number lists.
* This mostly experimental/advanced option with not for regular MDBX users. * This mostly experimental/advanced option with not for regular MDBX users.
* \warning The database format depend on this option and libmdbx builded with * \warning The database format depend on this option and libmdbx built with
* different option value are incompatible. */ * different option value are incompatible. */
#ifndef MDBX_PNL_ASCENDING #ifndef MDBX_PNL_ASCENDING
#define MDBX_PNL_ASCENDING 0 #define MDBX_PNL_ASCENDING 0
@ -2907,7 +2907,7 @@ typedef struct MDBX_lockinfo {
/* Paired counter of processes that have mlock()ed part of mmapped DB. /* Paired counter of processes that have mlock()ed part of mmapped DB.
* The (mti_mlcnt[0] - mti_mlcnt[1]) > 0 means at least one process * The (mti_mlcnt[0] - mti_mlcnt[1]) > 0 means at least one process
* lock at leat one page, so therefore madvise() could return EINVAL. */ * lock at least one page, so therefore madvise() could return EINVAL. */
MDBX_atomic_uint32_t mti_mlcnt[2]; MDBX_atomic_uint32_t mti_mlcnt[2];
MDBX_ALIGNAS(MDBX_CACHELINE_SIZE) /* cacheline ----------------------------*/ MDBX_ALIGNAS(MDBX_CACHELINE_SIZE) /* cacheline ----------------------------*/
@ -4285,7 +4285,7 @@ node_largedata_pgno(const MDBX_node *const __restrict node) {
* *
* BRANCH_NODE_MAX * BRANCH_NODE_MAX
* Branch-page must contain at least two nodes, within each a key and a child * Branch-page must contain at least two nodes, within each a key and a child
* page number. But page can't be splitted if it contains less that 4 keys, * page number. But page can't be split if it contains less that 4 keys,
* i.e. a page should not overflow before adding the fourth key. Therefore, * i.e. a page should not overflow before adding the fourth key. Therefore,
* at least 3 branch-node should fit in the single branch-page. Further, the * at least 3 branch-node should fit in the single branch-page. Further, the
* first node of a branch-page doesn't contain a key, i.e. the first node * first node of a branch-page doesn't contain a key, i.e. the first node
@ -4299,8 +4299,8 @@ node_largedata_pgno(const MDBX_node *const __restrict node) {
* Leaf-node must fit into single leaf-page, where a value could be placed on * Leaf-node must fit into single leaf-page, where a value could be placed on
* a large/overflow page. However, may require to insert a nearly page-sized * a large/overflow page. However, may require to insert a nearly page-sized
* node between two large nodes are already fill-up a page. In this case the * node between two large nodes are already fill-up a page. In this case the
* page must be splitted to two if some pair of nodes fits on one page, or * page must be split to two if some pair of nodes fits on one page, or
* otherwise the page should be splitted to the THREE with a single node * otherwise the page should be split to the THREE with a single node
* per each of ones. Such 1-into-3 page splitting is costly and complex since * per each of ones. Such 1-into-3 page splitting is costly and complex since
* requires TWO insertion into the parent page, that could lead to split it * requires TWO insertion into the parent page, that could lead to split it
* and so on up to the root. Therefore double-splitting is avoided here and * and so on up to the root. Therefore double-splitting is avoided here and
@ -4922,7 +4922,7 @@ static __always_inline bool safe64_reset_compare(MDBX_atomic_uint64_t *p,
* the asynchronously cancellation of read transaction. Therefore, * the asynchronously cancellation of read transaction. Therefore,
* there may be a collision between the cleanup performed here and * there may be a collision between the cleanup performed here and
* asynchronous termination and restarting of the read transaction * asynchronous termination and restarting of the read transaction
* in another proces/thread. In general we MUST NOT reset the `mr_txnid` * in another process/thread. In general we MUST NOT reset the `mr_txnid`
* if a new transaction was started (i.e. if `mr_txnid` was changed). */ * if a new transaction was started (i.e. if `mr_txnid` was changed). */
#if MDBX_64BIT_CAS #if MDBX_64BIT_CAS
bool rc = atomic_cas64(p, compare, UINT64_MAX); bool rc = atomic_cas64(p, compare, UINT64_MAX);
@ -18489,12 +18489,12 @@ __hot static __always_inline int page_get_checker_lite(const uint16_t ILL,
assert((ILL & (P_BRANCH | P_LEAF | P_LEAF2)) == 0); assert((ILL & (P_BRANCH | P_LEAF | P_LEAF2)) == 0);
assert(page->mp_flags & (P_BRANCH | P_LEAF | P_LEAF2)); assert(page->mp_flags & (P_BRANCH | P_LEAF | P_LEAF2));
return bad_page(page, "unexpected %s instead of %s (%u)\n", return bad_page(page, "unexpected %s instead of %s (%u)\n",
"large/overlow", "branch/leaf/leaf2", page->mp_flags); "large/overflow", "branch/leaf/leaf2", page->mp_flags);
} else if (ILL & (P_BRANCH | P_LEAF | P_LEAF2)) { } else if (ILL & (P_BRANCH | P_LEAF | P_LEAF2)) {
assert((ILL & P_BRANCH) && (ILL & P_LEAF) && (ILL & P_LEAF2)); assert((ILL & P_BRANCH) && (ILL & P_LEAF) && (ILL & P_LEAF2));
assert(page->mp_flags & (P_BRANCH | P_LEAF | P_LEAF2)); assert(page->mp_flags & (P_BRANCH | P_LEAF | P_LEAF2));
return bad_page(page, "unexpected %s instead of %s (%u)\n", return bad_page(page, "unexpected %s instead of %s (%u)\n",
"branch/leaf/leaf2", "large/overlow", page->mp_flags); "branch/leaf/leaf2", "large/overflow", page->mp_flags);
} else { } else {
assert(false); assert(false);
} }
@ -24323,7 +24323,7 @@ __cold static void compacting_fixup_meta(MDBX_env *env, MDBX_meta *meta) {
unaligned_poke_u64(4, meta->mm_sign, meta_sign(meta)); unaligned_poke_u64(4, meta->mm_sign, meta_sign(meta));
} }
/* Make resizeable */ /* Make resizable */
__cold static void meta_make_sizeable(MDBX_meta *meta) { __cold static void meta_make_sizeable(MDBX_meta *meta) {
meta->mm_geo.lower = MIN_PAGENO; meta->mm_geo.lower = MIN_PAGENO;
if (meta->mm_geo.grow_pv == 0) { if (meta->mm_geo.grow_pv == 0) {
@ -24571,7 +24571,7 @@ __cold static int env_copy_asis(MDBX_env *env, MDBX_txn *read_txn,
break; break;
rc = errno; rc = errno;
if (rc == EXDEV || rc == /* workaround for ecryptfs bug(s), if (rc == EXDEV || rc == /* workaround for ecryptfs bug(s),
maybe usefull for others fs */ maybe useful for others fs */
EINVAL) EINVAL)
not_the_same_filesystem = true; not_the_same_filesystem = true;
else if (ignore_enosys(rc) == MDBX_RESULT_TRUE) else if (ignore_enosys(rc) == MDBX_RESULT_TRUE)

View File

@ -36,7 +36,7 @@
/** Disables using GNU/Linux libc extensions. /** Disables using GNU/Linux libc extensions.
* \ingroup build_option * \ingroup build_option
* \note This option couldn't be moved to the options.h since dependant * \note This option couldn't be moved to the options.h since dependent
* control macros/defined should be prepared before include the options.h */ * control macros/defined should be prepared before include the options.h */
#ifndef MDBX_DISABLE_GNU_SOURCE #ifndef MDBX_DISABLE_GNU_SOURCE
#define MDBX_DISABLE_GNU_SOURCE 0 #define MDBX_DISABLE_GNU_SOURCE 0
@ -1654,7 +1654,7 @@ MDBX_INTERNAL_FUNC int osal_lck_destroy(MDBX_env *env,
MDBX_INTERNAL_FUNC int osal_lck_seize(MDBX_env *env); MDBX_INTERNAL_FUNC int osal_lck_seize(MDBX_env *env);
/// \brief Downgrades the level of initially acquired lock to /// \brief Downgrades the level of initially acquired lock to
/// operational level specified by argument. The reson for such downgrade: /// operational level specified by argument. The reason for such downgrade:
/// - unblocking of other processes that are waiting for access, i.e. /// - unblocking of other processes that are waiting for access, i.e.
/// if (env->me_flags & MDBX_EXCLUSIVE) != 0, then other processes /// if (env->me_flags & MDBX_EXCLUSIVE) != 0, then other processes
/// should be made aware that access is unavailable rather than /// should be made aware that access is unavailable rather than
@ -2037,7 +2037,7 @@ extern LIBMDBX_API const char *const mdbx_sourcery_anchor;
/** Controls sort order of internal page number lists. /** Controls sort order of internal page number lists.
* This mostly experimental/advanced option with not for regular MDBX users. * This mostly experimental/advanced option with not for regular MDBX users.
* \warning The database format depend on this option and libmdbx builded with * \warning The database format depend on this option and libmdbx built with
* different option value are incompatible. */ * different option value are incompatible. */
#ifndef MDBX_PNL_ASCENDING #ifndef MDBX_PNL_ASCENDING
#define MDBX_PNL_ASCENDING 0 #define MDBX_PNL_ASCENDING 0
@ -2907,7 +2907,7 @@ typedef struct MDBX_lockinfo {
/* Paired counter of processes that have mlock()ed part of mmapped DB. /* Paired counter of processes that have mlock()ed part of mmapped DB.
* The (mti_mlcnt[0] - mti_mlcnt[1]) > 0 means at least one process * The (mti_mlcnt[0] - mti_mlcnt[1]) > 0 means at least one process
* lock at leat one page, so therefore madvise() could return EINVAL. */ * lock at least one page, so therefore madvise() could return EINVAL. */
MDBX_atomic_uint32_t mti_mlcnt[2]; MDBX_atomic_uint32_t mti_mlcnt[2];
MDBX_ALIGNAS(MDBX_CACHELINE_SIZE) /* cacheline ----------------------------*/ MDBX_ALIGNAS(MDBX_CACHELINE_SIZE) /* cacheline ----------------------------*/

View File

@ -695,11 +695,11 @@ extern LIBMDBX_VERINFO_API const struct MDBX_build_info {
* automatically (de)initialization, releasing reader lock table slots * automatically (de)initialization, releasing reader lock table slots
* and so on. * and so on.
* *
* If MDBX builded as a DLL this is done out-of-the-box by DllEntry() function, * If MDBX is built as a DLL this is done out-of-the-box by DllEntry(),
* which called automatically by Windows core with passing corresponding reason * function which called automatically by Windows core with passing corresponding
* argument. * reason argument.
* *
* Otherwise, if MDBX was builded not as a DLL, some black magic * Otherwise, if MDBX was built not as a DLL, some black magic
* may be required depending of Windows version: * may be required depending of Windows version:
* *
* - Modern Windows versions, including Windows Vista and later, provides * - Modern Windows versions, including Windows Vista and later, provides
@ -881,7 +881,7 @@ enum MDBX_constants {
/* DEBUG & LOGGING ************************************************************/ /* DEBUG & LOGGING ************************************************************/
/** \addtogroup c_debug /** \addtogroup c_debug
* \note Most of debug feature enabled only when libmdbx builded with * \note Most of debug feature enabled only when libmdbx is built with
* \ref MDBX_DEBUG build option. @{ */ * \ref MDBX_DEBUG build option. @{ */
/** Log level /** Log level
@ -946,7 +946,7 @@ typedef enum MDBX_log_level_t MDBX_log_level_t;
* *
* \details `MDBX_DBG_DUMP` and `MDBX_DBG_LEGACY_MULTIOPEN` always have an * \details `MDBX_DBG_DUMP` and `MDBX_DBG_LEGACY_MULTIOPEN` always have an
* effect, but `MDBX_DBG_ASSERT`, `MDBX_DBG_AUDIT` and `MDBX_DBG_JITTER` only if * effect, but `MDBX_DBG_ASSERT`, `MDBX_DBG_AUDIT` and `MDBX_DBG_JITTER` only if
* libmdbx builded with \ref MDBX_DEBUG. */ * libmdbx is built with \ref MDBX_DEBUG. */
enum MDBX_debug_flags_t { enum MDBX_debug_flags_t {
MDBX_DBG_NONE = 0, MDBX_DBG_NONE = 0,
@ -1682,7 +1682,7 @@ enum MDBX_copy_flags_t {
* pages sequentially */ * pages sequentially */
MDBX_CP_COMPACT = 1u, MDBX_CP_COMPACT = 1u,
/** Force to make resizeable copy, i.e. dynamic size instead of fixed */ /** Force to make resizable copy, i.e. dynamic size instead of fixed */
MDBX_CP_FORCE_DYNAMIC_SIZE = 2u MDBX_CP_FORCE_DYNAMIC_SIZE = 2u
}; };
#ifndef __cplusplus #ifndef __cplusplus
@ -2407,7 +2407,7 @@ LIBMDBX_API int mdbx_env_deleteW(const wchar_t *pathnameW,
* account skipping free pages. * account skipping free pages.
* *
* - \ref MDBX_CP_FORCE_DYNAMIC_SIZE * - \ref MDBX_CP_FORCE_DYNAMIC_SIZE
* Force to make resizeable copy, i.e. dynamic size instead of fixed. * Force to make resizable copy, i.e. dynamic size instead of fixed.
* *
* \returns A non-zero error value on failure and 0 on success. */ * \returns A non-zero error value on failure and 0 on success. */
LIBMDBX_API int mdbx_env_copy(MDBX_env *env, const char *dest, LIBMDBX_API int mdbx_env_copy(MDBX_env *env, const char *dest,
@ -2863,7 +2863,7 @@ enum MDBX_warmup_flags_t {
MDBX_warmup_lock = 4, MDBX_warmup_lock = 4,
/** Alters corresponding current resource limits to be enough for lock pages /** Alters corresponding current resource limits to be enough for lock pages
* by \ref MDBX_warmup_lock. However, this option should be used in simpliest * by \ref MDBX_warmup_lock. However, this option should be used in simpler
* applications since takes into account only current size of this environment * applications since takes into account only current size of this environment
* disregarding all other factors. For real-world database application you * disregarding all other factors. For real-world database application you
* will need full-fledged management of resources and their limits with * will need full-fledged management of resources and their limits with
@ -2899,7 +2899,7 @@ DEFINE_ENUM_FLAG_OPERATORS(MDBX_warmup_flags_t)
* \param [in] timeout_seconds_16dot16 Optional timeout which checking only * \param [in] timeout_seconds_16dot16 Optional timeout which checking only
* during explicitly peeking database pages * during explicitly peeking database pages
* for loading ones if the \ref MDBX_warmup_force * for loading ones if the \ref MDBX_warmup_force
* option was spefified. * option was specified.
* *
* \returns A non-zero error value on failure and 0 on success. * \returns A non-zero error value on failure and 0 on success.
* Some possible errors are: * Some possible errors are:
@ -3027,7 +3027,7 @@ LIBMDBX_API int mdbx_env_get_fd(const MDBX_env *env, mdbx_filehandle_t *fd);
* was called after \ref mdbx_env_open() but OUTSIDE a write transaction, * was called after \ref mdbx_env_open() but OUTSIDE a write transaction,
* then MDBX will execute internal pseudo-transaction to apply new parameters * then MDBX will execute internal pseudo-transaction to apply new parameters
* (but only if anything has been changed), and changes be visible to any * (but only if anything has been changed), and changes be visible to any
* others processes immediately after succesful completion of function. * others processes immediately after successful completion of function.
* *
* Essentially a concept of "automatic size management" is simple and useful: * Essentially a concept of "automatic size management" is simple and useful:
* - There are the lower and upper bounds of the database file size; * - There are the lower and upper bounds of the database file size;
@ -5222,7 +5222,7 @@ mdbx_get_datacmp(MDBX_db_flags_t flags);
* \param [in] thread The reader thread ID. * \param [in] thread The reader thread ID.
* \param [in] bytes_used The number of last used page * \param [in] bytes_used The number of last used page
* in the MVCC-snapshot which being read, * in the MVCC-snapshot which being read,
* i.e. database file can't shrinked beyond this. * i.e. database file can't be shrunk beyond this.
* \param [in] bytes_retained The total size of the database pages that were * \param [in] bytes_retained The total size of the database pages that were
* retired by committed write transactions after * retired by committed write transactions after
* the reader's MVCC-snapshot, * the reader's MVCC-snapshot,

View File

@ -3450,7 +3450,7 @@ public:
/// transactions since the current read /// transactions since the current read
/// transaction started. /// transaction started.
size_t bytes_used; ///< The number of last used page in the MVCC-snapshot size_t bytes_used; ///< The number of last used page in the MVCC-snapshot
///< which being read, i.e. database file can't shrinked ///< which being read, i.e. database file can't be shrunk
///< beyond this. ///< beyond this.
size_t bytes_retained; ///< The total size of the database pages that size_t bytes_retained; ///< The total size of the database pages that
///< were retired by committed write transactions ///< were retired by committed write transactions

View File

@ -58,7 +58,7 @@
/** Disables using GNU/Linux libc extensions. /** Disables using GNU/Linux libc extensions.
* \ingroup build_option * \ingroup build_option
* \note This option couldn't be moved to the options.h since dependant * \note This option couldn't be moved to the options.h since dependent
* control macros/defined should be prepared before include the options.h */ * control macros/defined should be prepared before include the options.h */
#ifndef MDBX_DISABLE_GNU_SOURCE #ifndef MDBX_DISABLE_GNU_SOURCE
#define MDBX_DISABLE_GNU_SOURCE 0 #define MDBX_DISABLE_GNU_SOURCE 0
@ -1676,7 +1676,7 @@ MDBX_INTERNAL_FUNC int osal_lck_destroy(MDBX_env *env,
MDBX_INTERNAL_FUNC int osal_lck_seize(MDBX_env *env); MDBX_INTERNAL_FUNC int osal_lck_seize(MDBX_env *env);
/// \brief Downgrades the level of initially acquired lock to /// \brief Downgrades the level of initially acquired lock to
/// operational level specified by argument. The reson for such downgrade: /// operational level specified by argument. The reason for such downgrade:
/// - unblocking of other processes that are waiting for access, i.e. /// - unblocking of other processes that are waiting for access, i.e.
/// if (env->me_flags & MDBX_EXCLUSIVE) != 0, then other processes /// if (env->me_flags & MDBX_EXCLUSIVE) != 0, then other processes
/// should be made aware that access is unavailable rather than /// should be made aware that access is unavailable rather than
@ -2059,7 +2059,7 @@ extern LIBMDBX_API const char *const mdbx_sourcery_anchor;
/** Controls sort order of internal page number lists. /** Controls sort order of internal page number lists.
* This mostly experimental/advanced option with not for regular MDBX users. * This mostly experimental/advanced option with not for regular MDBX users.
* \warning The database format depend on this option and libmdbx builded with * \warning The database format depend on this option and libmdbx built with
* different option value are incompatible. */ * different option value are incompatible. */
#ifndef MDBX_PNL_ASCENDING #ifndef MDBX_PNL_ASCENDING
#define MDBX_PNL_ASCENDING 0 #define MDBX_PNL_ASCENDING 0
@ -2929,7 +2929,7 @@ typedef struct MDBX_lockinfo {
/* Paired counter of processes that have mlock()ed part of mmapped DB. /* Paired counter of processes that have mlock()ed part of mmapped DB.
* The (mti_mlcnt[0] - mti_mlcnt[1]) > 0 means at least one process * The (mti_mlcnt[0] - mti_mlcnt[1]) > 0 means at least one process
* lock at leat one page, so therefore madvise() could return EINVAL. */ * lock at least one page, so therefore madvise() could return EINVAL. */
MDBX_atomic_uint32_t mti_mlcnt[2]; MDBX_atomic_uint32_t mti_mlcnt[2];
MDBX_ALIGNAS(MDBX_CACHELINE_SIZE) /* cacheline ----------------------------*/ MDBX_ALIGNAS(MDBX_CACHELINE_SIZE) /* cacheline ----------------------------*/

View File

@ -58,7 +58,7 @@
/** Disables using GNU/Linux libc extensions. /** Disables using GNU/Linux libc extensions.
* \ingroup build_option * \ingroup build_option
* \note This option couldn't be moved to the options.h since dependant * \note This option couldn't be moved to the options.h since dependent
* control macros/defined should be prepared before include the options.h */ * control macros/defined should be prepared before include the options.h */
#ifndef MDBX_DISABLE_GNU_SOURCE #ifndef MDBX_DISABLE_GNU_SOURCE
#define MDBX_DISABLE_GNU_SOURCE 0 #define MDBX_DISABLE_GNU_SOURCE 0
@ -1676,7 +1676,7 @@ MDBX_INTERNAL_FUNC int osal_lck_destroy(MDBX_env *env,
MDBX_INTERNAL_FUNC int osal_lck_seize(MDBX_env *env); MDBX_INTERNAL_FUNC int osal_lck_seize(MDBX_env *env);
/// \brief Downgrades the level of initially acquired lock to /// \brief Downgrades the level of initially acquired lock to
/// operational level specified by argument. The reson for such downgrade: /// operational level specified by argument. The reason for such downgrade:
/// - unblocking of other processes that are waiting for access, i.e. /// - unblocking of other processes that are waiting for access, i.e.
/// if (env->me_flags & MDBX_EXCLUSIVE) != 0, then other processes /// if (env->me_flags & MDBX_EXCLUSIVE) != 0, then other processes
/// should be made aware that access is unavailable rather than /// should be made aware that access is unavailable rather than
@ -2059,7 +2059,7 @@ extern LIBMDBX_API const char *const mdbx_sourcery_anchor;
/** Controls sort order of internal page number lists. /** Controls sort order of internal page number lists.
* This mostly experimental/advanced option with not for regular MDBX users. * This mostly experimental/advanced option with not for regular MDBX users.
* \warning The database format depend on this option and libmdbx builded with * \warning The database format depend on this option and libmdbx built with
* different option value are incompatible. */ * different option value are incompatible. */
#ifndef MDBX_PNL_ASCENDING #ifndef MDBX_PNL_ASCENDING
#define MDBX_PNL_ASCENDING 0 #define MDBX_PNL_ASCENDING 0
@ -2929,7 +2929,7 @@ typedef struct MDBX_lockinfo {
/* Paired counter of processes that have mlock()ed part of mmapped DB. /* Paired counter of processes that have mlock()ed part of mmapped DB.
* The (mti_mlcnt[0] - mti_mlcnt[1]) > 0 means at least one process * The (mti_mlcnt[0] - mti_mlcnt[1]) > 0 means at least one process
* lock at leat one page, so therefore madvise() could return EINVAL. */ * lock at least one page, so therefore madvise() could return EINVAL. */
MDBX_atomic_uint32_t mti_mlcnt[2]; MDBX_atomic_uint32_t mti_mlcnt[2];
MDBX_ALIGNAS(MDBX_CACHELINE_SIZE) /* cacheline ----------------------------*/ MDBX_ALIGNAS(MDBX_CACHELINE_SIZE) /* cacheline ----------------------------*/

View File

@ -60,7 +60,7 @@
/** Disables using GNU/Linux libc extensions. /** Disables using GNU/Linux libc extensions.
* \ingroup build_option * \ingroup build_option
* \note This option couldn't be moved to the options.h since dependant * \note This option couldn't be moved to the options.h since dependent
* control macros/defined should be prepared before include the options.h */ * control macros/defined should be prepared before include the options.h */
#ifndef MDBX_DISABLE_GNU_SOURCE #ifndef MDBX_DISABLE_GNU_SOURCE
#define MDBX_DISABLE_GNU_SOURCE 0 #define MDBX_DISABLE_GNU_SOURCE 0
@ -1678,7 +1678,7 @@ MDBX_INTERNAL_FUNC int osal_lck_destroy(MDBX_env *env,
MDBX_INTERNAL_FUNC int osal_lck_seize(MDBX_env *env); MDBX_INTERNAL_FUNC int osal_lck_seize(MDBX_env *env);
/// \brief Downgrades the level of initially acquired lock to /// \brief Downgrades the level of initially acquired lock to
/// operational level specified by argument. The reson for such downgrade: /// operational level specified by argument. The reason for such downgrade:
/// - unblocking of other processes that are waiting for access, i.e. /// - unblocking of other processes that are waiting for access, i.e.
/// if (env->me_flags & MDBX_EXCLUSIVE) != 0, then other processes /// if (env->me_flags & MDBX_EXCLUSIVE) != 0, then other processes
/// should be made aware that access is unavailable rather than /// should be made aware that access is unavailable rather than
@ -2061,7 +2061,7 @@ extern LIBMDBX_API const char *const mdbx_sourcery_anchor;
/** Controls sort order of internal page number lists. /** Controls sort order of internal page number lists.
* This mostly experimental/advanced option with not for regular MDBX users. * This mostly experimental/advanced option with not for regular MDBX users.
* \warning The database format depend on this option and libmdbx builded with * \warning The database format depend on this option and libmdbx built with
* different option value are incompatible. */ * different option value are incompatible. */
#ifndef MDBX_PNL_ASCENDING #ifndef MDBX_PNL_ASCENDING
#define MDBX_PNL_ASCENDING 0 #define MDBX_PNL_ASCENDING 0
@ -2931,7 +2931,7 @@ typedef struct MDBX_lockinfo {
/* Paired counter of processes that have mlock()ed part of mmapped DB. /* Paired counter of processes that have mlock()ed part of mmapped DB.
* The (mti_mlcnt[0] - mti_mlcnt[1]) > 0 means at least one process * The (mti_mlcnt[0] - mti_mlcnt[1]) > 0 means at least one process
* lock at leat one page, so therefore madvise() could return EINVAL. */ * lock at least one page, so therefore madvise() could return EINVAL. */
MDBX_atomic_uint32_t mti_mlcnt[2]; MDBX_atomic_uint32_t mti_mlcnt[2];
MDBX_ALIGNAS(MDBX_CACHELINE_SIZE) /* cacheline ----------------------------*/ MDBX_ALIGNAS(MDBX_CACHELINE_SIZE) /* cacheline ----------------------------*/

View File

@ -58,7 +58,7 @@
/** Disables using GNU/Linux libc extensions. /** Disables using GNU/Linux libc extensions.
* \ingroup build_option * \ingroup build_option
* \note This option couldn't be moved to the options.h since dependant * \note This option couldn't be moved to the options.h since dependent
* control macros/defined should be prepared before include the options.h */ * control macros/defined should be prepared before include the options.h */
#ifndef MDBX_DISABLE_GNU_SOURCE #ifndef MDBX_DISABLE_GNU_SOURCE
#define MDBX_DISABLE_GNU_SOURCE 0 #define MDBX_DISABLE_GNU_SOURCE 0
@ -1676,7 +1676,7 @@ MDBX_INTERNAL_FUNC int osal_lck_destroy(MDBX_env *env,
MDBX_INTERNAL_FUNC int osal_lck_seize(MDBX_env *env); MDBX_INTERNAL_FUNC int osal_lck_seize(MDBX_env *env);
/// \brief Downgrades the level of initially acquired lock to /// \brief Downgrades the level of initially acquired lock to
/// operational level specified by argument. The reson for such downgrade: /// operational level specified by argument. The reason for such downgrade:
/// - unblocking of other processes that are waiting for access, i.e. /// - unblocking of other processes that are waiting for access, i.e.
/// if (env->me_flags & MDBX_EXCLUSIVE) != 0, then other processes /// if (env->me_flags & MDBX_EXCLUSIVE) != 0, then other processes
/// should be made aware that access is unavailable rather than /// should be made aware that access is unavailable rather than
@ -2059,7 +2059,7 @@ extern LIBMDBX_API const char *const mdbx_sourcery_anchor;
/** Controls sort order of internal page number lists. /** Controls sort order of internal page number lists.
* This mostly experimental/advanced option with not for regular MDBX users. * This mostly experimental/advanced option with not for regular MDBX users.
* \warning The database format depend on this option and libmdbx builded with * \warning The database format depend on this option and libmdbx built with
* different option value are incompatible. */ * different option value are incompatible. */
#ifndef MDBX_PNL_ASCENDING #ifndef MDBX_PNL_ASCENDING
#define MDBX_PNL_ASCENDING 0 #define MDBX_PNL_ASCENDING 0
@ -2929,7 +2929,7 @@ typedef struct MDBX_lockinfo {
/* Paired counter of processes that have mlock()ed part of mmapped DB. /* Paired counter of processes that have mlock()ed part of mmapped DB.
* The (mti_mlcnt[0] - mti_mlcnt[1]) > 0 means at least one process * The (mti_mlcnt[0] - mti_mlcnt[1]) > 0 means at least one process
* lock at leat one page, so therefore madvise() could return EINVAL. */ * lock at least one page, so therefore madvise() could return EINVAL. */
MDBX_atomic_uint32_t mti_mlcnt[2]; MDBX_atomic_uint32_t mti_mlcnt[2];
MDBX_ALIGNAS(MDBX_CACHELINE_SIZE) /* cacheline ----------------------------*/ MDBX_ALIGNAS(MDBX_CACHELINE_SIZE) /* cacheline ----------------------------*/

View File

@ -58,7 +58,7 @@
/** Disables using GNU/Linux libc extensions. /** Disables using GNU/Linux libc extensions.
* \ingroup build_option * \ingroup build_option
* \note This option couldn't be moved to the options.h since dependant * \note This option couldn't be moved to the options.h since dependent
* control macros/defined should be prepared before include the options.h */ * control macros/defined should be prepared before include the options.h */
#ifndef MDBX_DISABLE_GNU_SOURCE #ifndef MDBX_DISABLE_GNU_SOURCE
#define MDBX_DISABLE_GNU_SOURCE 0 #define MDBX_DISABLE_GNU_SOURCE 0
@ -1676,7 +1676,7 @@ MDBX_INTERNAL_FUNC int osal_lck_destroy(MDBX_env *env,
MDBX_INTERNAL_FUNC int osal_lck_seize(MDBX_env *env); MDBX_INTERNAL_FUNC int osal_lck_seize(MDBX_env *env);
/// \brief Downgrades the level of initially acquired lock to /// \brief Downgrades the level of initially acquired lock to
/// operational level specified by argument. The reson for such downgrade: /// operational level specified by argument. The reason for such downgrade:
/// - unblocking of other processes that are waiting for access, i.e. /// - unblocking of other processes that are waiting for access, i.e.
/// if (env->me_flags & MDBX_EXCLUSIVE) != 0, then other processes /// if (env->me_flags & MDBX_EXCLUSIVE) != 0, then other processes
/// should be made aware that access is unavailable rather than /// should be made aware that access is unavailable rather than
@ -2059,7 +2059,7 @@ extern LIBMDBX_API const char *const mdbx_sourcery_anchor;
/** Controls sort order of internal page number lists. /** Controls sort order of internal page number lists.
* This mostly experimental/advanced option with not for regular MDBX users. * This mostly experimental/advanced option with not for regular MDBX users.
* \warning The database format depend on this option and libmdbx builded with * \warning The database format depend on this option and libmdbx built with
* different option value are incompatible. */ * different option value are incompatible. */
#ifndef MDBX_PNL_ASCENDING #ifndef MDBX_PNL_ASCENDING
#define MDBX_PNL_ASCENDING 0 #define MDBX_PNL_ASCENDING 0
@ -2929,7 +2929,7 @@ typedef struct MDBX_lockinfo {
/* Paired counter of processes that have mlock()ed part of mmapped DB. /* Paired counter of processes that have mlock()ed part of mmapped DB.
* The (mti_mlcnt[0] - mti_mlcnt[1]) > 0 means at least one process * The (mti_mlcnt[0] - mti_mlcnt[1]) > 0 means at least one process
* lock at leat one page, so therefore madvise() could return EINVAL. */ * lock at least one page, so therefore madvise() could return EINVAL. */
MDBX_atomic_uint32_t mti_mlcnt[2]; MDBX_atomic_uint32_t mti_mlcnt[2];
MDBX_ALIGNAS(MDBX_CACHELINE_SIZE) /* cacheline ----------------------------*/ MDBX_ALIGNAS(MDBX_CACHELINE_SIZE) /* cacheline ----------------------------*/

View File

@ -58,7 +58,7 @@
/** Disables using GNU/Linux libc extensions. /** Disables using GNU/Linux libc extensions.
* \ingroup build_option * \ingroup build_option
* \note This option couldn't be moved to the options.h since dependant * \note This option couldn't be moved to the options.h since dependent
* control macros/defined should be prepared before include the options.h */ * control macros/defined should be prepared before include the options.h */
#ifndef MDBX_DISABLE_GNU_SOURCE #ifndef MDBX_DISABLE_GNU_SOURCE
#define MDBX_DISABLE_GNU_SOURCE 0 #define MDBX_DISABLE_GNU_SOURCE 0
@ -1676,7 +1676,7 @@ MDBX_INTERNAL_FUNC int osal_lck_destroy(MDBX_env *env,
MDBX_INTERNAL_FUNC int osal_lck_seize(MDBX_env *env); MDBX_INTERNAL_FUNC int osal_lck_seize(MDBX_env *env);
/// \brief Downgrades the level of initially acquired lock to /// \brief Downgrades the level of initially acquired lock to
/// operational level specified by argument. The reson for such downgrade: /// operational level specified by argument. The reason for such downgrade:
/// - unblocking of other processes that are waiting for access, i.e. /// - unblocking of other processes that are waiting for access, i.e.
/// if (env->me_flags & MDBX_EXCLUSIVE) != 0, then other processes /// if (env->me_flags & MDBX_EXCLUSIVE) != 0, then other processes
/// should be made aware that access is unavailable rather than /// should be made aware that access is unavailable rather than
@ -2059,7 +2059,7 @@ extern LIBMDBX_API const char *const mdbx_sourcery_anchor;
/** Controls sort order of internal page number lists. /** Controls sort order of internal page number lists.
* This mostly experimental/advanced option with not for regular MDBX users. * This mostly experimental/advanced option with not for regular MDBX users.
* \warning The database format depend on this option and libmdbx builded with * \warning The database format depend on this option and libmdbx built with
* different option value are incompatible. */ * different option value are incompatible. */
#ifndef MDBX_PNL_ASCENDING #ifndef MDBX_PNL_ASCENDING
#define MDBX_PNL_ASCENDING 0 #define MDBX_PNL_ASCENDING 0
@ -2929,7 +2929,7 @@ typedef struct MDBX_lockinfo {
/* Paired counter of processes that have mlock()ed part of mmapped DB. /* Paired counter of processes that have mlock()ed part of mmapped DB.
* The (mti_mlcnt[0] - mti_mlcnt[1]) > 0 means at least one process * The (mti_mlcnt[0] - mti_mlcnt[1]) > 0 means at least one process
* lock at leat one page, so therefore madvise() could return EINVAL. */ * lock at least one page, so therefore madvise() could return EINVAL. */
MDBX_atomic_uint32_t mti_mlcnt[2]; MDBX_atomic_uint32_t mti_mlcnt[2];
MDBX_ALIGNAS(MDBX_CACHELINE_SIZE) /* cacheline ----------------------------*/ MDBX_ALIGNAS(MDBX_CACHELINE_SIZE) /* cacheline ----------------------------*/

View File

@ -5,7 +5,7 @@ edition = "2021"
license = "MIT OR Apache-2.0" license = "MIT OR Apache-2.0"
repository = "https://github.com/paradigmxyz/reth" repository = "https://github.com/paradigmxyz/reth"
readme = "README.md" readme = "README.md"
description = "Task managment" description = "Task management"
[dependencies] [dependencies]
tokio = { version = "1", features = ["sync", "rt"] } tokio = { version = "1", features = ["sync", "rt"] }

View File

@ -150,7 +150,7 @@ impl<T: TransactionOrdering> TxPool<T> {
self.all_transactions.by_hash.get(tx_hash).cloned() self.all_transactions.by_hash.get(tx_hash).cloned()
} }
/// Returns all transaction for the hashes, if it exis. /// Returns all transaction for the hashes, if it exists.
pub(crate) fn get_all<'a>( pub(crate) fn get_all<'a>(
&'a self, &'a self,
txs: impl IntoIterator<Item = TxHash> + 'a, txs: impl IntoIterator<Item = TxHash> + 'a,
@ -477,7 +477,7 @@ impl<T: TransactionOrdering> fmt::Debug for TxPool<T> {
pub(crate) struct AllTransactions<T: PoolTransaction> { pub(crate) struct AllTransactions<T: PoolTransaction> {
/// Expected base fee for the pending block. /// Expected base fee for the pending block.
pending_basefee: U256, pending_basefee: U256,
/// Minimum base fee required by the protol. /// Minimum base fee required by the protocol.
/// ///
/// Transactions with a lower base fee will never be included by the chain /// Transactions with a lower base fee will never be included by the chain
minimal_protocol_basefee: U256, minimal_protocol_basefee: U256,

View File

@ -32,7 +32,7 @@ skip-tree = []
[licenses] [licenses]
unlicensed = "deny" unlicensed = "deny"
# List of explictly allowed licenses # List of explicitly allowed licenses
# See https://spdx.org/licenses/ for list of possible licenses # See https://spdx.org/licenses/ for list of possible licenses
# [possible values: any SPDX 3.7 short identifier (+ optional exception)]. # [possible values: any SPDX 3.7 short identifier (+ optional exception)].
allow = [ allow = [