This repository was archived by the owner on Sep 8, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +10
-3
lines changed
evm/vm/forks/tangerine_whistle Expand file tree Collapse file tree 2 files changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -12,3 +12,7 @@ class TangerineWhistleVM(HomesteadVM):
1212
1313 # classes
1414 _state_class = TangerineWhistleState # type: Type[BaseState]
15+
16+ # Don't bother with any DAO logic in Tangerine VM or later
17+ # This is how we skip DAO logic on Ropsten, for example
18+ support_dao_fork = False
Original file line number Diff line number Diff line change @@ -199,8 +199,11 @@ async def ensure_same_side_on_dao_fork(
199199 for start_block , vm_class in vm_configuration :
200200 if not issubclass (vm_class , HomesteadVM ):
201201 continue
202+ elif not vm_class .support_dao_fork :
203+ break
202204 elif start_block > vm_class .dao_fork_block_number :
203- continue
205+ # VM comes after the fork, so stop checking
206+ break
204207
205208 fork_block = vm_class .dao_fork_block_number
206209 try :
@@ -213,12 +216,12 @@ async def ensure_same_side_on_dao_fork(
213216 self .logger .info ("Timed out waiting for DAO fork header from %s" , self )
214217 raise
215218 except ValidationError as e :
216- raise HandshakeFailure ("Peer failed DAO fork check: {}" .format (e ))
219+ raise HandshakeFailure ("Peer failed DAO fork check retrieval : {}" .format (e ))
217220
218221 try :
219222 vm_class .validate_header (header , parent )
220223 except ValidationError as e :
221- raise HandshakeFailure ("Peer failed DAO fork check: {}" .format (e ))
224+ raise HandshakeFailure ("Peer failed DAO fork check validation : {}" .format (e ))
222225
223226 @abstractmethod
224227 async def _get_headers_at_chain_split (
You can’t perform that action at this time.
0 commit comments