File tree Expand file tree Collapse file tree 1 file changed +10
-4
lines changed Expand file tree Collapse file tree 1 file changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -163,10 +163,15 @@ def __call__(self, computation: ComputationAPI) -> None:
163
163
computation .stack_push_int (0 )
164
164
computation .return_data = b''
165
165
if insufficient_funds :
166
- err_msg = f"Insufficient Funds: { storage_address_balance } < { stack_data .endowment } "
166
+ self .logger .debug2 (
167
+ "%s failure: %s" ,
168
+ self .mnemonic ,
169
+ f"Insufficient Funds: { storage_address_balance } < { stack_data .endowment } "
170
+ )
167
171
elif stack_too_deep :
168
- err_msg = "Stack limit reached"
169
- self .logger .debug2 ("%s failure: %s" , self .mnemonic , err_msg ,)
172
+ self .logger .debug2 ("%s failure: %s" , self .mnemonic , "Stack limit reached" )
173
+ else :
174
+ raise RuntimeError ("Invariant: error must be insufficient funds or stack too deep" )
170
175
return
171
176
172
177
call_data = computation .memory_read_bytes (
@@ -183,11 +188,12 @@ def __call__(self, computation: ComputationAPI) -> None:
183
188
is_collision = computation .state .has_code_or_nonce (contract_address )
184
189
185
190
if is_collision :
191
+ computation .stack_push_int (0 )
192
+ computation .return_data = b''
186
193
self .logger .debug2 (
187
194
"Address collision while creating contract: %s" ,
188
195
encode_hex (contract_address ),
189
196
)
190
- computation .stack_push_int (0 )
191
197
return
192
198
193
199
child_msg = computation .prepare_child_message (
You can’t perform that action at this time.
0 commit comments