mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-16 18:00:46 +00:00
ignore faster with block no validator m2
This commit is contained in:
parent
ec1935a2c4
commit
176b51f1f8
3 changed files with 5 additions and 3 deletions
|
|
@ -151,7 +151,7 @@ func BenchmarkAddressHex(b *testing.B) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestRemoveItemInArray(t *testing.T) {
|
func TestRemoveItemInArray(t *testing.T) {
|
||||||
array := []Address{HexToAddress("0x0000003"),HexToAddress("0x0000001"), HexToAddress("0x0000002"),HexToAddress("0x0000003")}
|
array := []Address{HexToAddress("0x0000003"), HexToAddress("0x0000001"), HexToAddress("0x0000002"), HexToAddress("0x0000003")}
|
||||||
remove := []Address{HexToAddress("0x0000002"), HexToAddress("0x0000004"), HexToAddress("0x0000003")}
|
remove := []Address{HexToAddress("0x0000002"), HexToAddress("0x0000004"), HexToAddress("0x0000003")}
|
||||||
array = RemoveItemFromArray(array, remove)
|
array = RemoveItemFromArray(array, remove)
|
||||||
if len(array) != 1 {
|
if len(array) != 1 {
|
||||||
|
|
|
||||||
|
|
@ -35,5 +35,7 @@ var (
|
||||||
// plus one.
|
// plus one.
|
||||||
ErrInvalidNumber = errors.New("invalid block number")
|
ErrInvalidNumber = errors.New("invalid block number")
|
||||||
|
|
||||||
ErrMissingValidatorSignature = errors.New("missing validator in header")
|
ErrFailValidatorSignature = errors.New("missing validator in header")
|
||||||
|
|
||||||
|
ErrNoValidatorSignature = errors.New("no validator in header")
|
||||||
)
|
)
|
||||||
|
|
|
||||||
|
|
@ -669,7 +669,7 @@ func (f *Fetcher) insert(peer string, block *types.Block) {
|
||||||
time.Sleep(delay)
|
time.Sleep(delay)
|
||||||
log.Info("Receive future block", "number", block.NumberU64(), "hash", block.Hash().Hex(), "delay", delay)
|
log.Info("Receive future block", "number", block.NumberU64(), "hash", block.Hash().Hex(), "delay", delay)
|
||||||
goto again
|
goto again
|
||||||
case consensus.ErrMissingValidatorSignature:
|
case consensus.ErrNoValidatorSignature:
|
||||||
newBlock := block
|
newBlock := block
|
||||||
if f.appendM2HeaderHook != nil {
|
if f.appendM2HeaderHook != nil {
|
||||||
if newBlock, err = f.appendM2HeaderHook(block); err != nil {
|
if newBlock, err = f.appendM2HeaderHook(block); err != nil {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue