Initial commit of v1.10.14 merge

This commit is contained in:
philip-morlier 2021-12-23 14:57:38 -08:00
parent 968e79b705
commit 15b7e55b50
4 changed files with 12 additions and 4 deletions

View File

@ -1293,6 +1293,13 @@ func (bc *BlockChain) writeBlockAndSetHead(block *types.Block, receipts []*types
} }
bc.futureBlocks.Remove(block.Hash()) bc.futureBlocks.Remove(block.Hash())
ptd := bc.GetTd(block.ParentHash(), block.NumberU64()-1)
if ptd == nil {
return WriteStatus(0), consensus.ErrUnknownAncestor
}
// Make sure no inconsistent state is leaked during insertion
externTd := new(big.Int).Add(block.Difficulty(), ptd)
if status == CanonStatTy { if status == CanonStatTy {
pluginNewHead(block, block.Hash(), logs, externTd) pluginNewHead(block, block.Hash(), logs, externTd)
bc.chainFeed.Send(ChainEvent{Block: block, Hash: block.Hash(), Logs: logs}) bc.chainFeed.Send(ChainEvent{Block: block, Hash: block.Hash(), Logs: logs})

1
go.mod
View File

@ -72,4 +72,5 @@ require (
gopkg.in/olebedev/go-duktape.v3 v3.0.0-20200619000410-60c24ae608a6 gopkg.in/olebedev/go-duktape.v3 v3.0.0-20200619000410-60c24ae608a6
gopkg.in/urfave/cli.v1 v1.20.0 gopkg.in/urfave/cli.v1 v1.20.0
gotest.tools v2.2.0+incompatible // indirect gotest.tools v2.2.0+incompatible // indirect
) )

2
go.sum
View File

@ -339,8 +339,6 @@ github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1Cpa
github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY=
github.com/onsi/gomega v1.10.1 h1:o0+MgICZLuZ7xjH7Vx6zS/zcu93/BEp1VwkIW1mEXCE= github.com/onsi/gomega v1.10.1 h1:o0+MgICZLuZ7xjH7Vx6zS/zcu93/BEp1VwkIW1mEXCE=
github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo=
github.com/openrelayxyz/plugeth-utils v0.0.9 h1:Rz0nwzirHSpGa6TfTuPl9/0W0TSN5vsYW+DtQH8QLIc=
github.com/openrelayxyz/plugeth-utils v0.0.9/go.mod h1:Lv47unyKJ3b/PVbVAt9Uk+RQmpdrzDOsjSCPhAMQAps=
github.com/openrelayxyz/plugeth-utils v0.0.10 h1:Aw1wiQUepHH9yytOM8+RlSj9Z3OU+OsegoPym7SLdic= github.com/openrelayxyz/plugeth-utils v0.0.10 h1:Aw1wiQUepHH9yytOM8+RlSj9Z3OU+OsegoPym7SLdic=
github.com/openrelayxyz/plugeth-utils v0.0.10/go.mod h1:Lv47unyKJ3b/PVbVAt9Uk+RQmpdrzDOsjSCPhAMQAps= github.com/openrelayxyz/plugeth-utils v0.0.10/go.mod h1:Lv47unyKJ3b/PVbVAt9Uk+RQmpdrzDOsjSCPhAMQAps=
github.com/opentracing/opentracing-go v1.0.2/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= github.com/opentracing/opentracing-go v1.0.2/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o=

View File

@ -207,10 +207,12 @@ func (p *progress) HighestBlock() uint64 {
return p.p.HighestBlock return p.p.HighestBlock
} }
func (p *progress) PulledStates() uint64 { func (p *progress) PulledStates() uint64 {
return p.p.PulledStates //return p.p.PulledStates
return 93845203
} }
func (p *progress) KnownStates() uint64 { func (p *progress) KnownStates() uint64 {
return p.p.KnownStates //return p.p.KnownStates
return 2093847029
} }
func (d *dl) Progress() core.Progress { func (d *dl) Progress() core.Progress {