@@ -56,11 +56,11 @@ const (
56
56
var (
57
57
epochLength = uint64 (30000 ) // Default number of blocks after which to checkpoint and reset the pending votes
58
58
59
- extraVanity = 32 // Fixed number of extra-data prefix bytes reserved for signer vanity
60
- extraSeal = crypto .SignatureLength // Fixed number of extra-data suffix bytes reserved for signer seal
59
+ extraVanity = 32 // Fixed number of extra-data prefix bytes reserved for signer vanity
60
+ extraSeal = crypto .SignatureLength // Fixed number of extra-data suffix bytes reserved for signer seal
61
61
extraElaHeight = 8
62
- nonceAuthVote = hexutil .MustDecode ("0xffffffffffffffff" ) // Magic nonce number to vote on adding a new signer
63
- nonceDropVote = hexutil .MustDecode ("0x0000000000000000" ) // Magic nonce number to vote on removing a signer.
62
+ nonceAuthVote = hexutil .MustDecode ("0xffffffffffffffff" ) // Magic nonce number to vote on adding a new signer
63
+ nonceDropVote = hexutil .MustDecode ("0x0000000000000000" ) // Magic nonce number to vote on removing a signer.
64
64
65
65
uncleHash = types .CalcUncleHash (nil ) // Always Keccak256(RLP([])) as uncles are meaningless outside of PoW.
66
66
@@ -162,7 +162,6 @@ func ecrecover(header *types.Header, sigcache *lru.ARCCache) (common.Address, er
162
162
}
163
163
var signer common.Address
164
164
copy (signer [:], crypto .Keccak256 (pubkey [1 :])[12 :])
165
-
166
165
sigcache .Add (hash , signer )
167
166
return signer , nil
168
167
}
@@ -383,7 +382,7 @@ func (c *Clique) snapshot(chain consensus.ChainReader, number uint64, hash commo
383
382
if checkpoint != nil {
384
383
hash := checkpoint .Hash ()
385
384
signersSize := len (checkpoint .Extra ) - extraVanity - extraSeal
386
- if signersSize % common .AddressLength == extraElaHeight {
385
+ if signersSize % common .AddressLength == extraElaHeight {
387
386
signersSize -= extraElaHeight
388
387
}
389
388
@@ -425,7 +424,7 @@ func (c *Clique) snapshot(chain consensus.ChainReader, number uint64, hash commo
425
424
beforeChangeEngine := false
426
425
for i := 0 ; i < len (headers ); i ++ {
427
426
beforeChangeEngine = c .isBeforeChangeEngine (chain , headers [i ])
428
- log .Info ("snap headers" ,"number:" , headers [i ].Number .Uint64 (), "beforeChangeEngine" , beforeChangeEngine )
427
+ log .Info ("snap headers" , "number:" , headers [i ].Number .Uint64 (), "beforeChangeEngine" , beforeChangeEngine )
429
428
if beforeChangeEngine {
430
429
log .Info ("get before change engine header" )
431
430
break
@@ -586,7 +585,7 @@ func (c *Clique) Finalize(chain consensus.ChainReader, header *types.Header, sta
586
585
// No block rewards in PoA, so the state remains as is and uncles are dropped
587
586
header .Root = state .IntermediateRoot (chain .Config ().IsEIP158 (header .Number ))
588
587
header .UncleHash = types .CalcUncleHash (nil )
589
- log .Info ("clique finalize" , "height" , header .Number .Uint64 (), "hash" , header .Hash ().String ())
588
+ log .Info ("clique finalize" , "height" , header .Number .Uint64 (), "hash" , header .Hash ().String ())
590
589
}
591
590
592
591
// FinalizeAndAssemble implements consensus.Engine, ensuring no uncles are set,
@@ -615,7 +614,7 @@ func (c *Clique) isBeforeChangeEngine(chain consensus.ChainReader,
615
614
if chain .Config ().PBFTBlock == nil {
616
615
return false
617
616
}
618
- return chain .Config ().PBFTBlock .Uint64 () - 1 == header .Number .Uint64 ()
617
+ return chain .Config ().PBFTBlock .Uint64 ()- 1 == header .Number .Uint64 ()
619
618
}
620
619
621
620
// Seal implements consensus.Engine, attempting to create a sealed block using
@@ -696,7 +695,7 @@ func (c *Clique) Seal(chain consensus.ChainReader, block *types.Block, results c
696
695
if err != nil {
697
696
return err
698
697
}
699
- copy (header .Extra [length - extraSeal :], sighash )
698
+ copy (header .Extra [length - extraSeal :], sighash )
700
699
// Wait until sealing is terminated or delay timeout.
701
700
log .Trace ("Waiting for slot to sign and propagate" , "delay" , common .PrettyDuration (delay ))
702
701
go func () {
0 commit comments