aboutsummaryrefslogtreecommitdiffstats
path: root/consensus
diff options
context:
space:
mode:
authorFelix Lange <fjl@twurst.com>2019-08-22 21:14:06 +0800
committerGitHub <noreply@github.com>2019-08-22 21:14:06 +0800
commit54b271a86dd748f3b0bcebeaf678dc34e0d6177a (patch)
tree0a24f87f9dde9144b956a6adc54ba72c18f5ccd3 /consensus
parentb90cdbaa79cfe438aab0f1389d35980f3d38ec84 (diff)
downloadgo-tangerine-54b271a86dd748f3b0bcebeaf678dc34e0d6177a.tar
go-tangerine-54b271a86dd748f3b0bcebeaf678dc34e0d6177a.tar.gz
go-tangerine-54b271a86dd748f3b0bcebeaf678dc34e0d6177a.tar.bz2
go-tangerine-54b271a86dd748f3b0bcebeaf678dc34e0d6177a.tar.lz
go-tangerine-54b271a86dd748f3b0bcebeaf678dc34e0d6177a.tar.xz
go-tangerine-54b271a86dd748f3b0bcebeaf678dc34e0d6177a.tar.zst
go-tangerine-54b271a86dd748f3b0bcebeaf678dc34e0d6177a.zip
crypto: add SignatureLength constant and use it everywhere (#19996)
Original change by @jpeletier
Diffstat (limited to 'consensus')
-rw-r--r--consensus/clique/clique.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/consensus/clique/clique.go b/consensus/clique/clique.go
index 084009a06..02b6da35b 100644
--- a/consensus/clique/clique.go
+++ b/consensus/clique/clique.go
@@ -55,8 +55,8 @@ const (
var (
epochLength = uint64(30000) // Default number of blocks after which to checkpoint and reset the pending votes
- extraVanity = 32 // Fixed number of extra-data prefix bytes reserved for signer vanity
- extraSeal = 65 // Fixed number of extra-data suffix bytes reserved for signer seal
+ extraVanity = 32 // Fixed number of extra-data prefix bytes reserved for signer vanity
+ extraSeal = crypto.SignatureLength // Fixed number of extra-data suffix bytes reserved for signer seal
nonceAuthVote = hexutil.MustDecode("0xffffffffffffffff") // Magic nonce number to vote on adding a new signer
nonceDropVote = hexutil.MustDecode("0x0000000000000000") // Magic nonce number to vote on removing a signer.
@@ -728,7 +728,7 @@ func encodeSigHeader(w io.Writer, header *types.Header) {
header.GasLimit,
header.GasUsed,
header.Time,
- header.Extra[:len(header.Extra)-65], // Yes, this will panic if extra is too short
+ header.Extra[:len(header.Extra)-crypto.SignatureLength], // Yes, this will panic if extra is too short
header.MixDigest,
header.Nonce,
})