Skip to content

Commit

Permalink
xin-104 (ethereum#36)
Browse files Browse the repository at this point in the history
* hand and vote self mined block

* add error log
  • Loading branch information
liam-lai authored Jan 7, 2022
1 parent 5c32696 commit 3ac908b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion eth/fetcher/fetcher.go
Original file line number Diff line number Diff line change
Expand Up @@ -728,7 +728,7 @@ func (f *Fetcher) insert(peer string, block *types.Block) {
}
err = f.handleProposedBlock(block.Header())
if err != nil {
log.Error("[insert] Unable to handle new proposed block", "err", err)
log.Error("[insert] Unable to handle new proposed block", "err", err, "number", block.Number(), "hash", block.Hash())
}
// TODO: (XIN-101) Add propose block handler
// If import succeeded, broadcast the block
Expand Down
4 changes: 4 additions & 0 deletions miner/worker.go
Original file line number Diff line number Diff line change
Expand Up @@ -397,6 +397,10 @@ func (self *worker) wait() {

if self.config.XDPoS != nil {
c := self.engine.(*XDPoS.XDPoS)
err = c.HandleProposedBlock(self.chain, block.Header())
if err != nil {
log.Error("[wait] Unable to handle new proposed block", "err", err, "number", block.Number(), "hash", block.Hash())
}

authorized := c.IsAuthorisedAddress(block.Header(), self.chain, self.coinbase)
if !authorized {
Expand Down

0 comments on commit 3ac908b

Please sign in to comment.