mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-27 23:26:44 +00:00
* dev: chg: bump deps * internal/cli/server, rpc: lower down http readtimeout to 10s * dev: chg: get p2p adapter * dev: chg: lower down jsonrpc readtimeout to 10s * cherry-pick txpool optimisation changes * add check for empty lists in txpool (#704) * add check * linters * core, miner: add empty instrumentation name for tracing --------- Co-authored-by: Raneet Debnath <raneetdebnath10@gmail.com> Co-authored-by: SHIVAM SHARMA <shivam691999@gmail.com> Co-authored-by: Evgeny Danilenko <6655321@bk.ru> Co-authored-by: Manav Darji <manavdarji.india@gmail.com>
23 lines
308 B
Go
23 lines
308 B
Go
package math
|
|
|
|
import (
|
|
"math/big"
|
|
|
|
"github.com/holiman/uint256"
|
|
)
|
|
|
|
var (
|
|
U0 = uint256.NewInt(0)
|
|
U1 = uint256.NewInt(1)
|
|
U100 = uint256.NewInt(100)
|
|
)
|
|
|
|
func U256LTE(a, b *uint256.Int) bool {
|
|
return a.Lt(b) || a.Eq(b)
|
|
}
|
|
|
|
func FromBig(v *big.Int) *uint256.Int {
|
|
u, _ := uint256.FromBig(v)
|
|
|
|
return u
|
|
}
|