Skip to content

Commit 0077aac

Browse files
authored
Update Merge fork name to match geth. (#31)
1 parent 12d7e2a commit 0077aac

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

src/ethereum_test_tools/vm/fork.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
"berlin",
2222
"london",
2323
"arrow glacier",
24-
"merged",
24+
"merge",
2525
"shanghai",
2626
]
2727

@@ -59,7 +59,7 @@ def is_london(fork: str) -> bool:
5959
return i >= forks.index("london")
6060

6161

62-
def is_merged(fork: str) -> bool:
62+
def is_merge(fork: str) -> bool:
6363
"""
6464
Returns `True` if `fork` is Merge-compatible, `False` otherwise.
6565
"""
@@ -68,7 +68,7 @@ def is_merged(fork: str) -> bool:
6868
return False
6969

7070
i = forks.index(fork_lower)
71-
return i >= forks.index("merged")
71+
return i >= forks.index("merge")
7272

7373

7474
def is_shanghai(fork: str) -> bool:
@@ -99,21 +99,21 @@ def get_reward(fork: str) -> int:
9999
"""
100100
Returns the expected reward amount in wei of a given fork
101101
"""
102-
return 0 if is_merged(fork) else 2000000000000000000
102+
return 0 if is_merge(fork) else 2000000000000000000
103103

104104

105105
def must_have_zero_difficulty(fork: str) -> bool:
106106
"""
107107
Returns `True` if the environment is expected to have `difficulty==0`
108108
"""
109-
return is_merged(fork)
109+
return is_merge(fork)
110110

111111

112112
def must_contain_prev_randao(fork: str) -> bool:
113113
"""
114114
Returns `True` if the environment is expected to have `currentRandom` value
115115
"""
116-
return is_merged(fork)
116+
return is_merge(fork)
117117

118118

119119
def must_contain_base_fee(fork: str) -> bool:

src/evm_transition_tool/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,7 @@ def version(self) -> str:
270270
"berlin": "Berlin",
271271
"london": "London",
272272
"arrow glacier": "ArrowGlacier",
273-
"merged": "Merged",
273+
"merge": "Merge",
274274
"shanghai": "Shanghai",
275275
}
276276

@@ -288,7 +288,7 @@ def random_required(fork: str) -> bool:
288288
"""
289289
Return true if the fork requires currentRandom in the block.
290290
"""
291-
return fork_list.index(fork.lower()) >= fork_list.index("merged")
291+
return fork_list.index(fork.lower()) >= fork_list.index("merge")
292292

293293

294294
def withdrawals_required(fork: str) -> bool:

0 commit comments

Comments
 (0)