mirror of
https://gitlab.com/pulsechaincom/erigon-pulse.git
synced 2024-12-25 21:17:16 +00:00
Fix compare
This commit is contained in:
parent
71ab5d52b6
commit
1938bfcddf
@ -155,9 +155,10 @@ func (block *Block) PayFee(addr []byte, fee *big.Int) bool {
|
||||
}
|
||||
|
||||
func (block *Block) CalcGasLimit(parent *Block) *big.Int {
|
||||
if block.Number == big.NewInt(0) {
|
||||
if block.Number.Cmp(big.NewInt(0)) == 0 {
|
||||
return ethutil.BigPow(10, 6)
|
||||
}
|
||||
|
||||
previous := new(big.Int).Mul(big.NewInt(1023), parent.GasLimit)
|
||||
current := new(big.Rat).Mul(new(big.Rat).SetInt(block.GasUsed), big.NewRat(6, 5))
|
||||
curInt := new(big.Int).Div(current.Num(), current.Denom())
|
||||
|
Loading…
Reference in New Issue
Block a user