File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -327,9 +327,13 @@ def test_state_fixtures(fixture, fixture_vm_class):
327
327
receipts = vm .block .get_receipts (chaindb ) + (receipt , )
328
328
block = vm .set_block_transactions (vm .block , header , transactions , receipts )
329
329
except ValidationError as err :
330
- state .account_db .set_balance (vm .block .header .coinbase , 0 )
331
- state .account_db .persist ()
332
- vm .block = vm .block .copy (header = vm .block .header .copy (state_root = state .state_root ))
330
+ # This feels terribly wrong
331
+ coinbase_balance = state .account_db .get_balance (vm .block .header .coinbase )
332
+ if coinbase_balance == 0 :
333
+ state .account_db .set_balance (vm .block .header .coinbase , 0 )
334
+ state .account_db .persist ()
335
+ vm .block = vm .block .copy (header = vm .block .header .copy (state_root = state .state_root ))
336
+
333
337
block = vm .block
334
338
transaction_error = err
335
339
logger .warning ("Got transaction error" , exc_info = True )
You can’t perform that action at this time.
0 commit comments