Skip to content
This repository has been archived by the owner on Nov 5, 2023. It is now read-only.

Commit

Permalink
Merge pull request #134 from anton-rs/merklefruit/primitives-small-fixes
Browse files Browse the repository at this point in the history
fix(primitives): pub U256, import spacing
  • Loading branch information
refcell authored Oct 30, 2023
2 parents 8f9a748 + 56aab40 commit 474b4f4
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion crates/primitives/src/revm/env.rs
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,7 @@ pub fn fill_tx_env<T>(
TransactionKind::Call(to) => tx_env.transact_to = TransactTo::Call(to),
TransactionKind::Create => tx_env.transact_to = TransactTo::create(),
}
tx_env.value = tx.value.0;
tx_env.value = tx.value.into();
tx_env.data = tx.input.clone();
tx_env.chain_id = None;
tx_env.nonce = None;
Expand Down
2 changes: 1 addition & 1 deletion crates/primitives/src/transaction/tx_value.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ use proptest::{
/// this full precision, hence we use a wrapper type to allow for overriding of encoding.
#[add_arbitrary_tests(compact, rlp)]
#[derive(Default, Debug, Copy, Clone, Hash, PartialEq, Eq, Serialize, Deserialize)]
pub struct TxValue(pub U256);
pub struct TxValue(U256);

impl From<TxValue> for U256 {
/// unwrap Value to U256
Expand Down
3 changes: 1 addition & 2 deletions crates/revm/src/optimism/processor.rs
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
use std::time::Instant;

use reth_interfaces::executor::{BlockExecutionError, BlockValidationError};
use reth_primitives::{
revm::compat::into_reth_log, revm_primitives::ResultAndState, Address, Block, Hardfork,
Receipt, U256,
};
use reth_provider::{BlockExecutor, BlockExecutorStats, BundleStateWithReceipts};
use revm::DatabaseCommit;
use std::time::Instant;
use tracing::{debug, trace};

use crate::processor::{verify_receipt, EVMProcessor};
Expand Down
2 changes: 1 addition & 1 deletion crates/transaction-pool/src/validate/eth.rs
Original file line number Diff line number Diff line change
Expand Up @@ -818,7 +818,7 @@ mod tests {
from: signer,
to: TransactionKind::Create,
mint: None,
value: reth_primitives::TxValue(U256::ZERO),
value: reth_primitives::TxValue::from(U256::ZERO),
gas_limit: 0u64,
is_system_transaction: false,
input: Default::default(),
Expand Down

0 comments on commit 474b4f4

Please sign in to comment.