diff options
Diffstat (limited to 'chain')
-rw-r--r-- | chain/chain_manager.go | 2 | ||||
-rw-r--r-- | chain/state_transition.go | 9 | ||||
-rw-r--r-- | chain/vm_env.go | 2 |
3 files changed, 6 insertions, 7 deletions
diff --git a/chain/chain_manager.go b/chain/chain_manager.go index 217a50103..077db649f 100644 --- a/chain/chain_manager.go +++ b/chain/chain_manager.go @@ -328,8 +328,8 @@ func (self *ChainManager) InsertChain(chain *BlockChain) { for e := chain.Front(); e != nil; e = e.Next() { link := e.Value.(*link) - self.SetTotalDifficulty(link.td) self.add(link.block) + self.SetTotalDifficulty(link.td) self.Ethereum.EventMux().Post(NewBlockEvent{link.block}) self.Ethereum.EventMux().Post(link.messages) } diff --git a/chain/state_transition.go b/chain/state_transition.go index 41bdadedb..be117cf29 100644 --- a/chain/state_transition.go +++ b/chain/state_transition.go @@ -4,7 +4,6 @@ import ( "fmt" "math/big" - "github.com/ethereum/go-ethereum/ethutil" "github.com/ethereum/go-ethereum/state" "github.com/ethereum/go-ethereum/vm" ) @@ -229,13 +228,13 @@ func (self *StateTransition) TransitionState() (err error) { } msg.Output = ret - } else { - // Add default LOG. Default = big(sender.addr) + 1 - addr := ethutil.BigD(receiver.Address()) - self.state.AddLog(state.Log{sender.Address(), [][]byte{ethutil.U256(addr.Add(addr, ethutil.Big1)).Bytes()}, nil}) } } + // Add default LOG. Default = big(sender.addr) + 1 + //addr := ethutil.BigD(receiver.Address()) + //self.state.AddLog(&state.Log{ethutil.U256(addr.Add(addr, ethutil.Big1)).Bytes(), [][]byte{sender.Address()}, nil}) + return } diff --git a/chain/vm_env.go b/chain/vm_env.go index 53092bd10..4f3dc3ca4 100644 --- a/chain/vm_env.go +++ b/chain/vm_env.go @@ -31,7 +31,7 @@ func (self *VMEnv) BlockHash() []byte { return self.block.Hash() } func (self *VMEnv) Value() *big.Int { return self.tx.Value } func (self *VMEnv) State() *state.State { return self.state } func (self *VMEnv) GasLimit() *big.Int { return self.block.GasLimit } -func (self *VMEnv) AddLog(log state.Log) { +func (self *VMEnv) AddLog(log *state.Log) { self.state.AddLog(log) } func (self *VMEnv) Transfer(from, to vm.Account, amount *big.Int) error { |