forked from cerc-io/plugeth
eth, les: polish forkid a bit, fix races and transition validation
This commit is contained in:
@@ -59,7 +59,8 @@ func StartENRUpdater(chain *core.BlockChain, ln *enode.LocalNode) {
|
||||
|
||||
// currentENREntry constructs an `eth` ENR entry based on the current state of the chain.
|
||||
func currentENREntry(chain *core.BlockChain) *enrEntry {
|
||||
head := chain.CurrentHeader()
|
||||
return &enrEntry{
|
||||
ForkID: forkid.NewID(chain.Config(), chain.Genesis().Hash(), chain.CurrentHeader().Number.Uint64(), chain.CurrentHeader().Time),
|
||||
ForkID: forkid.NewID(chain.Config(), chain.Genesis().Hash(), head.Number.Uint64(), head.Time),
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user