فهرست منبع

Merge pull request #11 from guagualvcha/gas_limit

[R4R]remove redundant gaslimit check
zjubfd 5 سال پیش
والد
کامیت
11bc803884
1فایلهای تغییر یافته به همراه0 افزوده شده و 4 حذف شده
  1. 0 4
      consensus/parlia/parlia.go

+ 0 - 4
consensus/parlia/parlia.go

@@ -336,10 +336,6 @@ func (p *Parlia) verifyHeader(chain consensus.ChainReader, header *types.Header,
 	if len(header.Extra) < extraVanity+extraSeal {
 		return errMissingSignature
 	}
-	// Verify that the gasUsed is <= gasLimit
-	if header.GasUsed > header.GasLimit {
-		return fmt.Errorf("invalid gasUsed: have %d, gasLimit %d", header.GasUsed, header.GasLimit)
-	}
 	// check extra data
 	isEpoch := number%p.config.Epoch == 0