aboutsummaryrefslogtreecommitdiff
path: root/consensus/dummy/consensus.go
diff options
context:
space:
mode:
Diffstat (limited to 'consensus/dummy/consensus.go')
-rw-r--r--consensus/dummy/consensus.go7
1 files changed, 3 insertions, 4 deletions
diff --git a/consensus/dummy/consensus.go b/consensus/dummy/consensus.go
index a496262..2a9441d 100644
--- a/consensus/dummy/consensus.go
+++ b/consensus/dummy/consensus.go
@@ -93,8 +93,7 @@ func (self *DummyEngine) verifyHeaderWorker(chain consensus.ChainReader, headers
}
func (self *DummyEngine) Author(header *types.Header) (common.Address, error) {
- addr := common.Address{}
- return addr, nil
+ return header.Coinbase, nil
}
func (self *DummyEngine) VerifyHeader(chain consensus.ChainReader, header *types.Header, seal bool) error {
@@ -173,7 +172,7 @@ func (self *DummyEngine) VerifySeal(chain consensus.ChainReader, header *types.H
}
func (self *DummyEngine) Prepare(chain consensus.ChainReader, header *types.Header) error {
- header.Difficulty = big.NewInt(0)
+ header.Difficulty = big.NewInt(1)
return nil
}
@@ -222,7 +221,7 @@ func (self *DummyEngine) SealHash(header *types.Header) (hash common.Hash) {
}
func (self *DummyEngine) CalcDifficulty(chain consensus.ChainReader, time uint64, parent *types.Header) *big.Int {
- return big.NewInt(0)
+ return big.NewInt(1)
}
func (self *DummyEngine) APIs(chain consensus.ChainReader) []rpc.API {