mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-19 10:22:23 +00:00
fix(GPO): tests (#938)
* fix(GPO): tests * fix `newTestBackend` * improve --------- Co-authored-by: HAOYUatHZ <haoyu@protonmail.com> Co-authored-by: HAOYUatHZ <37070449+HAOYUatHZ@users.noreply.github.com>
This commit is contained in:
parent
c6b46fb268
commit
f8bfb3aa5e
2 changed files with 4 additions and 2 deletions
|
|
@ -51,7 +51,7 @@ func TestFeeHistory(t *testing.T) {
|
||||||
{true, 1000, 1000, 2, rpc.PendingBlockNumber, nil, 32, 2, nil},
|
{true, 1000, 1000, 2, rpc.PendingBlockNumber, nil, 32, 2, nil},
|
||||||
{true, 1000, 1000, 2, rpc.PendingBlockNumber, []float64{0, 10}, 32, 2, nil},
|
{true, 1000, 1000, 2, rpc.PendingBlockNumber, []float64{0, 10}, 32, 2, nil},
|
||||||
{false, 1000, 1000, 2, rpc.FinalizedBlockNumber, []float64{0, 10}, 24, 2, nil},
|
{false, 1000, 1000, 2, rpc.FinalizedBlockNumber, []float64{0, 10}, 24, 2, nil},
|
||||||
{false, 1000, 1000, 2, rpc.SafeBlockNumber, []float64{0, 10}, 24, 2, nil},
|
//{false, 1000, 1000, 2, rpc.SafeBlockNumber, []float64{0, 10}, 24, 2, nil}, // We currently do not use rpc.SafeBlockNumber
|
||||||
}
|
}
|
||||||
for i, c := range cases {
|
for i, c := range cases {
|
||||||
config := Config{
|
config := Config{
|
||||||
|
|
|
||||||
|
|
@ -143,10 +143,12 @@ func newTestBackend(t *testing.T, londonBlock *big.Int, pending bool) *testBacke
|
||||||
config.BernoulliBlock = londonBlock
|
config.BernoulliBlock = londonBlock
|
||||||
config.CurieBlock = londonBlock
|
config.CurieBlock = londonBlock
|
||||||
config.ShanghaiTime = nil
|
config.ShanghaiTime = nil
|
||||||
|
config.DarwinTime = nil
|
||||||
if londonBlock != nil {
|
if londonBlock != nil {
|
||||||
shanghaiTime := londonBlock.Uint64() * 12
|
shanghaiTime := londonBlock.Uint64() * 12
|
||||||
config.ShanghaiTime = &shanghaiTime
|
config.ShanghaiTime = &shanghaiTime
|
||||||
config.DarwinTime = &shanghaiTime
|
darwinTime := londonBlock.Uint64() * 12
|
||||||
|
config.DarwinTime = &darwinTime
|
||||||
}
|
}
|
||||||
|
|
||||||
config.TerminalTotalDifficulty = common.Big0
|
config.TerminalTotalDifficulty = common.Big0
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue