-
Notifications
You must be signed in to change notification settings - Fork 537
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Found this code while doing the code review on frontier.
frontier/frame/ethereum/src/lib.rs
Lines 443 to 455 in db4411c
| let mut cumulative_gas_used = U256::zero(); | |
| for (transaction, status, receipt) in Pending::<T>::get() { | |
| transactions.push(transaction); | |
| statuses.push(status); | |
| receipts.push(receipt.clone()); | |
| let (logs, used_gas) = match receipt { | |
| Receipt::Legacy(d) | Receipt::EIP2930(d) | Receipt::EIP1559(d) => { | |
| (d.logs.clone(), d.used_gas) | |
| } | |
| }; | |
| cumulative_gas_used = used_gas; | |
| Self::logs_bloom(logs, &mut logs_bloom); | |
| } |
Why cumulative_gas_used = used_gas?
I'd think it should be something like cumulative_gas_used += used_gas?
Unless used_gas already includes the gas of all previous txs (which doesn't seem to be the case) - this is a bug?
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working