EIP-2929: add tx sender and address into the access list (#360)
This commit is contained in:
parent
582bca385f
commit
6ce6666cbb
@ -1145,6 +1145,7 @@ impl<'a, B: 'a + StateBackend> Executive<'a, B> {
|
|||||||
let mut access_list = AccessList::new(schedule.eip2929);
|
let mut access_list = AccessList::new(schedule.eip2929);
|
||||||
|
|
||||||
if schedule.eip2929 {
|
if schedule.eip2929 {
|
||||||
|
access_list.insert_address(sender);
|
||||||
for (address, _) in self.machine.builtins() {
|
for (address, _) in self.machine.builtins() {
|
||||||
access_list.insert_address(*address);
|
access_list.insert_address(*address);
|
||||||
}
|
}
|
||||||
@ -1232,6 +1233,7 @@ impl<'a, B: 'a + StateBackend> Executive<'a, B> {
|
|||||||
&nonce,
|
&nonce,
|
||||||
&t.tx().data,
|
&t.tx().data,
|
||||||
);
|
);
|
||||||
|
access_list.insert_address(new_address);
|
||||||
let params = ActionParams {
|
let params = ActionParams {
|
||||||
code_address: new_address.clone(),
|
code_address: new_address.clone(),
|
||||||
code_hash: code_hash,
|
code_hash: code_hash,
|
||||||
@ -1255,6 +1257,7 @@ impl<'a, B: 'a + StateBackend> Executive<'a, B> {
|
|||||||
(res, out)
|
(res, out)
|
||||||
}
|
}
|
||||||
Action::Call(ref address) => {
|
Action::Call(ref address) => {
|
||||||
|
access_list.insert_address(address.clone());
|
||||||
let params = ActionParams {
|
let params = ActionParams {
|
||||||
code_address: address.clone(),
|
code_address: address.clone(),
|
||||||
address: address.clone(),
|
address: address.clone(),
|
||||||
|
Loading…
Reference in New Issue
Block a user