aboutsummaryrefslogtreecommitdiffstats
path: root/eth/backend.go
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2015-03-22 01:18:19 +0800
committerobscuren <geffobscura@gmail.com>2015-03-22 01:18:19 +0800
commit7f85608f30a2e34005c8d15566849229c758c2f1 (patch)
tree7aeb9d8bdfda7ec10ea38688a96ed245028764ad /eth/backend.go
parent09766d1729f7530093aec7e9acd3e5339b2c2028 (diff)
parentfcacfabe1959c4aff6a63cb4e275f65328660601 (diff)
downloadgo-tangerine-7f85608f30a2e34005c8d15566849229c758c2f1.tar
go-tangerine-7f85608f30a2e34005c8d15566849229c758c2f1.tar.gz
go-tangerine-7f85608f30a2e34005c8d15566849229c758c2f1.tar.bz2
go-tangerine-7f85608f30a2e34005c8d15566849229c758c2f1.tar.lz
go-tangerine-7f85608f30a2e34005c8d15566849229c758c2f1.tar.xz
go-tangerine-7f85608f30a2e34005c8d15566849229c758c2f1.tar.zst
go-tangerine-7f85608f30a2e34005c8d15566849229c758c2f1.zip
Merge branch 'conversion' into develop
Diffstat (limited to 'eth/backend.go')
-rw-r--r--eth/backend.go9
1 files changed, 5 insertions, 4 deletions
diff --git a/eth/backend.go b/eth/backend.go
index c1aa28f3c..141c6c605 100644
--- a/eth/backend.go
+++ b/eth/backend.go
@@ -195,7 +195,8 @@ func New(config *Config) (*Ethereum, error) {
hasBlock := eth.chainManager.HasBlock
insertChain := eth.chainManager.InsertChain
- eth.blockPool = blockpool.New(hasBlock, insertChain, eth.pow.Verify)
+ td := eth.chainManager.Td()
+ eth.blockPool = blockpool.New(hasBlock, insertChain, eth.pow.Verify, eth.EventMux(), td)
netprv, err := config.nodeKey()
if err != nil {
@@ -295,7 +296,7 @@ func (s *Ethereum) StartMining() error {
servlogger.Errorf("Cannot start mining without coinbase: %v\n", err)
return fmt.Errorf("no coinbase: %v", err)
}
- s.miner.Start(cb)
+ s.miner.Start(common.BytesToAddress(cb))
return nil
}
@@ -405,7 +406,7 @@ func (self *Ethereum) txBroadcastLoop() {
// automatically stops if unsubscribe
for obj := range self.txSub.Chan() {
event := obj.(core.TxPreEvent)
- self.net.Broadcast("eth", TxMsg, event.Tx.RlpData())
+ self.net.Broadcast("eth", TxMsg, []*types.Transaction{event.Tx})
}
}
@@ -414,7 +415,7 @@ func (self *Ethereum) blockBroadcastLoop() {
for obj := range self.blockSub.Chan() {
switch ev := obj.(type) {
case core.NewMinedBlockEvent:
- self.net.Broadcast("eth", NewBlockMsg, ev.Block.RlpData(), ev.Block.Td)
+ self.net.Broadcast("eth", NewBlockMsg, []interface{}{ev.Block, ev.Block.Td})
}
}
}