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):
12
12
13
13
# classes
14
14
_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(
199
199
for start_block , vm_class in vm_configuration :
200
200
if not issubclass (vm_class , HomesteadVM ):
201
201
continue
202
+ elif not vm_class .support_dao_fork :
203
+ break
202
204
elif start_block > vm_class .dao_fork_block_number :
203
- continue
205
+ # VM comes after the fork, so stop checking
206
+ break
204
207
205
208
fork_block = vm_class .dao_fork_block_number
206
209
try :
@@ -213,12 +216,12 @@ async def ensure_same_side_on_dao_fork(
213
216
self .logger .info ("Timed out waiting for DAO fork header from %s" , self )
214
217
raise
215
218
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 ))
217
220
218
221
try :
219
222
vm_class .validate_header (header , parent )
220
223
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 ))
222
225
223
226
@abstractmethod
224
227
async def _get_headers_at_chain_split (
You can’t perform that action at this time.
0 commit comments