From cc6329187df650f108c425cb4579c9e69615488f Mon Sep 17 00:00:00 2001 From: Guilherme Ferreira Date: Fri, 23 Feb 2024 13:05:02 -0300 Subject: [PATCH] add coinbase to genesis block on tests --- core/genesis.go | 1 + quaiclient/ethclient/ethclient_test.go | 1 + 2 files changed, 2 insertions(+) diff --git a/core/genesis.go b/core/genesis.go index ecb380cc42..b1ee7afcc4 100644 --- a/core/genesis.go +++ b/core/genesis.go @@ -270,6 +270,7 @@ func (g *Genesis) ToBlock(db ethdb.Database) *types.Block { head.SetGasLimit(g.GasLimit) head.SetGasUsed(0) head.SetBaseFee(new(big.Int).SetUint64(params.InitialBaseFee)) + head.SetCoinbase(g.Coinbase) if g.GasLimit == 0 { head.SetGasLimit(params.GenesisGasLimit) } diff --git a/quaiclient/ethclient/ethclient_test.go b/quaiclient/ethclient/ethclient_test.go index 4c2c6dd945..61779de04f 100644 --- a/quaiclient/ethclient/ethclient_test.go +++ b/quaiclient/ethclient/ethclient_test.go @@ -111,6 +111,7 @@ func generateTestChain(db ethdb.Database, logger *log.Logger) (*core.Genesis, [] ExtraData: []byte("test genesis"), GasLimit: 5000000, Difficulty: big.NewInt(300000000), + Coinbase: testAddr, } generate := func(i int, g *core.BlockGen) { g.OffsetTime(5)