diff options
author | Gustav Simonsson <gustav.simonsson@gmail.com> | 2015-05-27 19:30:24 +0800 |
---|---|---|
committer | Gustav Simonsson <gustav.simonsson@gmail.com> | 2015-05-27 19:30:24 +0800 |
commit | bf5f0b1d0cf9207c8958646f6ac16ffbaf89d7fa (patch) | |
tree | e3badca7d997afc8c220cf004166b2a2d26439d6 /core/block_processor.go | |
parent | 14955bd4542e422daad5c6b39cfe07cdcb86b230 (diff) | |
download | go-tangerine-bf5f0b1d0cf9207c8958646f6ac16ffbaf89d7fa.tar go-tangerine-bf5f0b1d0cf9207c8958646f6ac16ffbaf89d7fa.tar.gz go-tangerine-bf5f0b1d0cf9207c8958646f6ac16ffbaf89d7fa.tar.bz2 go-tangerine-bf5f0b1d0cf9207c8958646f6ac16ffbaf89d7fa.tar.lz go-tangerine-bf5f0b1d0cf9207c8958646f6ac16ffbaf89d7fa.tar.xz go-tangerine-bf5f0b1d0cf9207c8958646f6ac16ffbaf89d7fa.tar.zst go-tangerine-bf5f0b1d0cf9207c8958646f6ac16ffbaf89d7fa.zip |
Update ValidateHeader comments
Diffstat (limited to 'core/block_processor.go')
-rw-r--r-- | core/block_processor.go | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/core/block_processor.go b/core/block_processor.go index 037782407..e064cdd80 100644 --- a/core/block_processor.go +++ b/core/block_processor.go @@ -285,9 +285,8 @@ func (self *BlockProcessor) GetBlockReceipts(bhash common.Hash) (receipts types. } -// Validates the current block. Returns an error if the block was invalid, -// an uncle or anything that isn't on the current block chain. -// Validation validates easy over difficult (dagger takes longer time = difficult) +// See YP section 4.3.4. "Block Header Validity" +// Validates a block. Returns an error if the block is invalid. func (sm *BlockProcessor) ValidateHeader(block, parent *types.Header, checkPow bool) error { if big.NewInt(int64(len(block.Extra))).Cmp(params.MaximumExtraDataSize) == 1 { return fmt.Errorf("Block extra data too long (%d)", len(block.Extra)) @@ -298,7 +297,6 @@ func (sm *BlockProcessor) ValidateHeader(block, parent *types.Header, checkPow b return fmt.Errorf("Difficulty check failed for block %v, %v", block.Difficulty, expd) } - // block.gasLimit - parent.gasLimit <= parent.gasLimit / GasLimitBoundDivisor a := new(big.Int).Sub(block.GasLimit, parent.GasLimit) a.Abs(a) b := new(big.Int).Div(parent.GasLimit, params.GasLimitBoundDivisor) |