Special diff output for execution
This commit is contained in:
@ -1,6 +1,7 @@
|
||||
package ethchain
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"github.com/ethereum/eth-go/ethcrypto"
|
||||
"github.com/ethereum/eth-go/ethtrie"
|
||||
"github.com/ethereum/eth-go/ethutil"
|
||||
@ -208,6 +209,16 @@ func (self *State) Update() {
|
||||
}
|
||||
}
|
||||
|
||||
// Debug stuff
|
||||
func (self *State) CreateOutputForDiff() {
|
||||
for addr, stateObject := range self.stateObjects {
|
||||
fmt.Printf("0x%x 0x%x 0x%x 0x%x\n", addr, stateObject.state.Root(), stateObject.Amount.Bytes(), stateObject.Nonce)
|
||||
stateObject.state.EachStorage(func(addr string, value *ethutil.Value) {
|
||||
fmt.Printf("0x%x 0x%x\n", addr, value.Bytes())
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
// Object manifest
|
||||
//
|
||||
// The object manifest is used to keep changes to the state so we can keep track of the changes
|
||||
|
Reference in New Issue
Block a user