• 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
.github Loading commit data...
Godeps Loading commit data...
_data Loading commit data...
accounts Loading commit data...
build Loading commit data...
cmd Loading commit data...
common Loading commit data...
compression/rle Loading commit data...
console Loading commit data...
containers Loading commit data...
core Loading commit data...
crypto Loading commit data...
errs Loading commit data...
eth Loading commit data...
ethdb Loading commit data...
event Loading commit data...
generators Loading commit data...
internal Loading commit data...
light Loading commit data...
logger Loading commit data...
metrics Loading commit data...
miner Loading commit data...
node Loading commit data...
p2p Loading commit data...
params Loading commit data...
pow Loading commit data...
release Loading commit data...
rlp Loading commit data...
rpc Loading commit data...
tests Loading commit data...
trie Loading commit data...
whisper Loading commit data...
.gitattributes Loading commit data...
.gitignore Loading commit data...
.gitmodules Loading commit data...
.mailmap Loading commit data...
.travis.yml Loading commit data...
AUTHORS Loading commit data...
COPYING Loading commit data...
COPYING.LESSER Loading commit data...
Makefile Loading commit data...
README.md Loading commit data...
VERSION Loading commit data...