consensus/ethash: use single algorithm definition

This commit is contained in:
rjl493456442 2019-01-13 21:50:35 +08:00
parent 921cec807a
commit 076530ddb7
2 changed files with 2 additions and 6 deletions

View file

@ -43,10 +43,7 @@ import (
"github.com/hashicorp/golang-lru/simplelru"
)
const (
algorithmName = "ethash" // PoW algorithm name
algorithmVersion = "1.0.0" // Algorithm revision information
)
const algorithmVersion = "ethash/1.0.0" // PoW algorithm version
var ErrInvalidDumpMagic = errors.New("invalid dump magic")

View file

@ -26,7 +26,6 @@ import (
"math/rand"
"net/http"
"runtime"
"strings"
"sync"
"time"
@ -244,7 +243,7 @@ func (ethash *Ethash) remote(notify []string, noverify bool) {
currentWork[1] = common.BytesToHash(SeedHash(block.NumberU64())).Hex()
currentWork[2] = common.BytesToHash(new(big.Int).Div(two256, block.Difficulty()).Bytes()).Hex()
currentWork[3] = hexutil.EncodeBig(block.Number())
currentWork[4] = strings.Join([]string{algorithmName, algorithmVersion}, "/")
currentWork[4] = algorithmVersion
// Trace the seal work fetched by remote sealer.
currentBlock = block