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

Commit

Permalink
dbg
Browse files Browse the repository at this point in the history
  • Loading branch information
clabby committed Aug 19, 2023
1 parent 5ceca0b commit 8fe2d10
Showing 1 changed file with 22 additions and 22 deletions.
44 changes: 22 additions & 22 deletions crates/payload/basic/src/optimism.rs
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,6 @@ where

let sender_old_acc = to_reth_acc(&sender.info);
let mut sender_new_acc = to_reth_acc(&sender_new.info);

Check failure on line 95 in crates/payload/basic/src/optimism.rs

View workflow job for this annotation

GitHub Actions / code lint

variable does not need to be mutable
sender_new_acc.balance += U256::from(m);

post_state.change_account(
parent_block.number + 1,
Expand Down Expand Up @@ -186,28 +185,29 @@ where
}
}

// Push transaction changeset and calculate header bloom filter for receipt.
post_state.add_receipt(
block_number,
Receipt {
tx_type: sequencer_tx.tx_type(),
success: result.is_success(),
cumulative_gas_used,
logs: result.logs().into_iter().map(into_reth_log).collect(),
deposit_nonce: if is_regolith && sequencer_tx.is_deposit() {
// Recovering the signer from the deposit transaction is only fetching
// the `from` address. Deposit transactions have no signature.
let from = sequencer_tx.signer();
let account = db.load_account(from)?;
// The deposit nonce is the account's nonce - 1. The account's nonce
// was incremented during the execution of the deposit transaction
// above.
Some(account.info.nonce.saturating_sub(1))
} else {
None
},
let r = Receipt {
tx_type: sequencer_tx.tx_type(),
success: result.is_success(),
cumulative_gas_used,
logs: result.logs().into_iter().map(into_reth_log).collect(),
deposit_nonce: if is_regolith && sequencer_tx.is_deposit() {
// Recovering the signer from the deposit transaction is only fetching
// the `from` address. Deposit transactions have no signature.
let from = sequencer_tx.signer();
let account = db.load_account(from)?;
// The deposit nonce is the account's nonce - 1. The account's nonce
// was incremented during the execution of the deposit transaction
// above.
Some(account.info.nonce.saturating_sub(1))
} else {
None
},
);
};

dbg!(&r, result);

// Push transaction changeset and calculate header bloom filter for receipt.
post_state.add_receipt(block_number, r);

dbg!("COMMITTED STATE CHANGES");

Expand Down

0 comments on commit 8fe2d10

Please sign in to comment.