• Jeffrey Wilcke's avatar
    core/state, eth: Updated suicides objects when tracing transactions · bb3651ab
    Jeffrey Wilcke authored
    Consensus rules dictate that objects can only be removed during the
    finalisation of the transaction (i.e. after all calls have finished).
    Thus calling a suicided contract twice from the same transaction:
    A->B(S)->ret(A)->B(S) results in 2 suicides. Calling the suicided
    object twice from two transactions: A->B(S), A->B, results in only one
    suicide and a call to an empty object.
    
    Our current debug tracing functionality replays all transaction that
    were executed prior to the targetted transaction in order to provide
    the user with an accurate trace.
    
    As a side effect to calling StateDB.IntermediateRoot it also deletes any
    suicides objects. Our tracing code never calls this function because it
    isn't interested in the intermediate root. Becasue of this it caused a
    bug in the tracing code where transactions that were send to priviously
    deleted objects resulted in two suicides rather than one suicide and a
    call to an empty object.
    
    Fixes #2542
    bb3651ab
Name
Last commit
Last update
..
dump.go Loading commit data...
iterator.go Loading commit data...
iterator_test.go Loading commit data...
main_test.go Loading commit data...
managed_state.go Loading commit data...
managed_state_test.go Loading commit data...
state_object.go Loading commit data...
state_test.go Loading commit data...
statedb.go Loading commit data...
statedb_test.go Loading commit data...
sync.go Loading commit data...
sync_test.go Loading commit data...