Skip to content

Commit

Permalink
Fix access list tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jannikluhn authored and pipermerriam committed Jan 4, 2018
1 parent 3707a1d commit 62e4934
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions tests/core/access-restrictions-utils/test_access_list.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@
from evm.constants import (
STORAGE_TRIE_PREFIX,
)
from evm.validation import (
validate_transaction_access_list,
)

from evm.rlp.sedes import (
access_list as access_list_sedes,
Expand Down Expand Up @@ -85,13 +88,12 @@ def test_remove_redundant_prefixes(prefixes, expected):
assert actual == expected



@pytest.mark.parametrize(
'access_list,expected',
[
(
((),),
b'\xc1\xc0'
(),
b'\xc0'
),
(
((TEST_ADDRESS1,),),
Expand Down Expand Up @@ -130,6 +132,7 @@ def test_remove_redundant_prefixes(prefixes, expected):
]
)
def test_rlp_encoding(access_list, expected):
validate_transaction_access_list(access_list)
encoded = rlp.encode(access_list, access_list_sedes)
print(encoded)
print(expected)
Expand All @@ -143,7 +146,7 @@ def test_rlp_encoding(access_list, expected):
'invalid_access_list',
[
b'',
pytest.param([], marks=pytest.mark.xfail), # FIXME: bug in pyrlp
[[]],
[[[]]],
[[b'']],
[[b'\xaa' * 40]],
Expand Down

0 comments on commit 62e4934

Please sign in to comment.