aboutsummaryrefslogtreecommitdiffstats
path: root/consensus/clique/clique.go
diff options
context:
space:
mode:
authorgary rong <garyrong0905@gmail.com>2018-08-23 21:02:57 +0800
committerPéter Szilágyi <peterke@gmail.com>2018-08-23 21:02:57 +0800
commit40a71f28cf1ada0bf6bdcdc2f3c6f31a8da134a2 (patch)
tree70d5c37338def1e3246a3117ac84abca793c476a /consensus/clique/clique.go
parentc3f7e3be3b60df3edd168e80aa89ee2992932b0d (diff)
downloadgo-tangerine-40a71f28cf1ada0bf6bdcdc2f3c6f31a8da134a2.tar.gz
go-tangerine-40a71f28cf1ada0bf6bdcdc2f3c6f31a8da134a2.tar.zst
go-tangerine-40a71f28cf1ada0bf6bdcdc2f3c6f31a8da134a2.zip
miner: fix state commit, track old work packages too (#17490)
* miner: commit state which is relative with sealing result * consensus, core, miner, mobile: introduce sealHash interface * miner: evict pending task with threshold * miner: go fmt
Diffstat (limited to 'consensus/clique/clique.go')
-rw-r--r--consensus/clique/clique.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/consensus/clique/clique.go b/consensus/clique/clique.go
index 085944701..3730c91f6 100644
--- a/consensus/clique/clique.go
+++ b/consensus/clique/clique.go
@@ -673,6 +673,11 @@ func CalcDifficulty(snap *Snapshot, signer common.Address) *big.Int {
return new(big.Int).Set(diffNoTurn)
}
+// SealHash returns the hash of a block prior to it being sealed.
+func (c *Clique) SealHash(header *types.Header) common.Hash {
+ return sigHash(header)
+}
+
// Close implements consensus.Engine. It's a noop for clique as there is are no background threads.
func (c *Clique) Close() error {
return nil