fix 'dumpBlockState' in tracer.nim

This commit is contained in:
andri lim 2019-02-02 16:20:45 +07:00 committed by zah
parent 7c6c7dbe3a
commit c71a842050
1 changed files with 2 additions and 1 deletions

View File

@ -157,7 +157,6 @@ proc dumpBlockState*(db: BaseChainDB, header: BlockHeader, body: BlockBody, dump
before = newJArray()
after = newJArray()
stateBefore = newAccountStateDB(captureTrieDB, parent.stateRoot, db.pruneTrie)
stateAfter = newAccountStateDB(captureTrieDB, header.stateRoot, db.pruneTrie)
for idx, tx in body.transactions:
let sender = tx.getSender
@ -172,6 +171,8 @@ proc dumpBlockState*(db: BaseChainDB, header: BlockHeader, body: BlockBody, dump
discard captureChainDB.processBlock(parent, header, body, vmState)
var stateAfter = vmState.accountDb
for idx, tx in body.transactions:
let sender = tx.getSender
let recipient = tx.getRecipient