Browse Source

Switch to YP compliant gas accounting at block 830k

cl-refactor
Gav Wood 10 years ago
parent
commit
5124ff752b
  1. 3
      libethereum/State.cpp

3
libethereum/State.cpp

@ -1262,8 +1262,7 @@ ExecutionResult State::execute(LastHashes const& _lh, Transaction const& _t, Per
// Add to the user-originated transactions that we've executed.
m_transactions.push_back(e.t());
// m_receipts.push_back(TransactionReceipt(rootHash(), startGasUsed + e.gasUsedNoRefunds(), e.logs())); // TODO: Switch in to be compliant with YP.
m_receipts.push_back(TransactionReceipt(rootHash(), startGasUsed + e.gasUsed(), e.logs()));
m_receipts.push_back(TransactionReceipt(rootHash(), startGasUsed + (m_currentBlock.number >= 830000 ? e.gasUsedNoRefunds() : e.gasUsed()), e.logs()));
m_transactionSet.insert(e.t().sha3());
}

Loading…
Cancel
Save