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

Commit

Permalink
Alter balance to maximum possible rather than GP=0.
Browse files Browse the repository at this point in the history
  • Loading branch information
gavofyork committed Jan 11, 2017
1 parent a04ff60 commit 116386e
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions ethcore/src/client/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -893,14 +893,13 @@ impl BlockChainClient for Client {
ExecutionError::TransactionMalformed(message)
})?;
let balance = original_state.balance(&sender);
let needed_balance = t.value + t.gas * t.gas_price;
let needed_balance = t.value + U256::from(UPPER_CEILING) * t.gas_price;
if balance < needed_balance {
// give the sender a sufficient balance
original_state.add_balance(&sender, &(needed_balance - balance), CleanupMode::NoEmpty);
}
let options = TransactOptions { tracing: true, vm_tracing: false, check_nonce: false };
let mut tx = t.clone();
tx.gas_price = 0.into();

let mut cond = |gas| {
let mut state = original_state.clone();
Expand Down

0 comments on commit 116386e

Please sign in to comment.