diff options
author | zelig <viktor.tron@gmail.com> | 2014-06-23 19:54:10 +0800 |
---|---|---|
committer | zelig <viktor.tron@gmail.com> | 2014-06-23 19:54:10 +0800 |
commit | b9e8a3e02493d5bbf23cfcab259e66f6ae166612 (patch) | |
tree | 63a13e2d4bfb3daf0a9b06b32b8ef8b849556781 /ethchain/state_transition.go | |
parent | 8e9cc3697944c3e568186a5c23ac729f6eb4a1f4 (diff) | |
download | go-tangerine-b9e8a3e02493d5bbf23cfcab259e66f6ae166612.tar go-tangerine-b9e8a3e02493d5bbf23cfcab259e66f6ae166612.tar.gz go-tangerine-b9e8a3e02493d5bbf23cfcab259e66f6ae166612.tar.bz2 go-tangerine-b9e8a3e02493d5bbf23cfcab259e66f6ae166612.tar.lz go-tangerine-b9e8a3e02493d5bbf23cfcab259e66f6ae166612.tar.xz go-tangerine-b9e8a3e02493d5bbf23cfcab259e66f6ae166612.tar.zst go-tangerine-b9e8a3e02493d5bbf23cfcab259e66f6ae166612.zip |
modified logging API
- package vars for tagged loggers
- weed out spurious fmt.PrintX and log.PrintX logging
- tried to second guess loglevel for some :)
Diffstat (limited to 'ethchain/state_transition.go')
-rw-r--r-- | ethchain/state_transition.go | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/ethchain/state_transition.go b/ethchain/state_transition.go index 1f5b4f959..f84c3486b 100644 --- a/ethchain/state_transition.go +++ b/ethchain/state_transition.go @@ -2,7 +2,6 @@ package ethchain import ( "fmt" - "github.com/ethereum/eth-go/ethutil" "math/big" ) @@ -135,12 +134,12 @@ func (self *StateTransition) preCheck() (err error) { } func (self *StateTransition) TransitionState() (err error) { - ethutil.Config.Log.Printf(ethutil.LogLevelInfo, "(~) %x\n", self.tx.Hash()) + statelogger.Infof("(~) %x\n", self.tx.Hash()) /* defer func() { if r := recover(); r != nil { - ethutil.Config.Log.Infoln(r) + logger.Infoln(r) err = fmt.Errorf("state transition err %v", r) } }() @@ -231,7 +230,7 @@ func (self *StateTransition) transferValue(sender, receiver *StateObject) error // Add the amount to receivers account which should conclude this transaction receiver.AddAmount(self.value) - //ethutil.Config.Log.Debugf("%x => %x (%v)\n", sender.Address()[:4], receiver.Address()[:4], self.value) + //statelogger.Debugf("%x => %x (%v)\n", sender.Address()[:4], receiver.Address()[:4], self.value) //} return nil |