forked from cerc-io/plugeth
Changed diff output not to prefix hex with 0x
This commit is contained in:
parent
6426f3635e
commit
5b2e5d180f
@ -212,9 +212,9 @@ func (self *State) Update() {
|
|||||||
// Debug stuff
|
// Debug stuff
|
||||||
func (self *State) CreateOutputForDiff() {
|
func (self *State) CreateOutputForDiff() {
|
||||||
for addr, stateObject := range self.stateObjects {
|
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)
|
fmt.Printf("%x %x %x %x\n", addr, stateObject.state.Root(), stateObject.Amount.Bytes(), stateObject.Nonce)
|
||||||
stateObject.state.EachStorage(func(addr string, value *ethutil.Value) {
|
stateObject.state.EachStorage(func(addr string, value *ethutil.Value) {
|
||||||
fmt.Printf("0x%x 0x%x\n", addr, value.Bytes())
|
fmt.Printf("%x %x\n", addr, value.Bytes())
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -151,7 +151,7 @@ done:
|
|||||||
receipts = append(receipts, receipt)
|
receipts = append(receipts, receipt)
|
||||||
handled = append(handled, tx)
|
handled = append(handled, tx)
|
||||||
|
|
||||||
if ethutil.Config.Diff {
|
if ethutil.Config.Diff && ethutil.Config.DiffType == "all" {
|
||||||
state.CreateOutputForDiff()
|
state.CreateOutputForDiff()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -187,8 +187,8 @@ func (sm *StateManager) Process(block *Block, dontReact bool) (err error) {
|
|||||||
// before that.
|
// before that.
|
||||||
defer state.Reset()
|
defer state.Reset()
|
||||||
|
|
||||||
if ethutil.Config.Diff {
|
if ethutil.Config.Diff && ethutil.Config.DiffType == "all" {
|
||||||
fmt.Printf("## 0x%x 0x%x ##\n", block.Hash(), block.Number)
|
fmt.Printf("## %x %x ##\n", block.Hash(), block.Number)
|
||||||
}
|
}
|
||||||
|
|
||||||
receipts, err := sm.ApplyDiff(state, parent, block)
|
receipts, err := sm.ApplyDiff(state, parent, block)
|
||||||
|
Loading…
Reference in New Issue
Block a user