EIP-168, 169: Dust protection (#4757)
* Dust protection * Track touched accounts in the substate * Minor alterations
This commit is contained in:
@@ -211,7 +211,7 @@ fn make_tx_and_env(
|
||||
use transaction::{Action, Transaction};
|
||||
|
||||
let transaction = Transaction {
|
||||
nonce: engine.account_start_nonce(),
|
||||
nonce: engine.account_start_nonce(header.number()),
|
||||
action: Action::Call(addr),
|
||||
gas: 50_000_000.into(),
|
||||
gas_price: 0.into(),
|
||||
@@ -469,7 +469,7 @@ impl Rebuilder for ChunkRebuilder {
|
||||
let mut state = State::from_existing(
|
||||
db.boxed_clone(),
|
||||
self.manifest.state_root.clone(),
|
||||
engine.account_start_nonce(),
|
||||
engine.account_start_nonce(target_header.number()),
|
||||
factories,
|
||||
).map_err(|e| format!("State root mismatch: {}", e))?;
|
||||
|
||||
|
||||
@@ -124,7 +124,7 @@ fn make_chain(accounts: Arc<AccountProvider>, blocks_beyond: usize, transitions:
|
||||
};
|
||||
|
||||
// execution callback for native contract: push transaction to be sealed.
|
||||
let nonce = RefCell::new(client.engine().account_start_nonce());
|
||||
let nonce = RefCell::new(client.engine().account_start_nonce(0));
|
||||
let exec = |addr, data| {
|
||||
let mut nonce = nonce.borrow_mut();
|
||||
let transaction = Transaction {
|
||||
|
||||
Reference in New Issue
Block a user