EIP2929: only add builtin to warm address if they are active

This commit is contained in:
Wei Tang 2021-04-15 16:30:48 +02:00 committed by rakita
parent 5fdedf0858
commit 5709dbc3e0

View File

@ -1145,8 +1145,10 @@ impl<'a, B: 'a + StateBackend> Executive<'a, B> {
let mut access_list = AccessList::new(schedule.eip2929);
if schedule.eip2929 {
for (address, _) in self.machine.builtins() {
access_list.insert_address(*address);
for (address, builtin) in self.machine.builtins() {
if builtin.is_active() {
access_list.insert_address(*address);
}
}
if schedule.eip2930 {
// optional access list