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

fix(primitives): pub U256, import spacing #134

Merged
merged 2 commits into from
Oct 30, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading