Skip to content
This repository has been archived by the owner on May 21, 2024. It is now read-only.

Commit

Permalink
Update tests with BaseFee
Browse files Browse the repository at this point in the history
  • Loading branch information
ecmendenhall committed Aug 24, 2021
1 parent a768d08 commit 3b3d44c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
4 changes: 2 additions & 2 deletions core/blockchain_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3053,7 +3053,7 @@ func testSendingStateChangeEvents(t *testing.T, numberOfEventsToSend int) {
key2, _ = crypto.HexToECDSA("8a1f9a8f95be41cd7ccb6168179afb4504aefe388d1e14474d32c45c72ce7b7a")
addr2 = crypto.PubkeyToAddress(key2.PublicKey)
db = rawdb.NewMemoryDatabase()
gspec = &Genesis{Config: params.TestChainConfig, Alloc: GenesisAlloc{addr1: {Balance: big.NewInt(10000000000000)}}}
gspec = &Genesis{Config: params.TestChainConfig, Alloc: GenesisAlloc{addr1: {Balance: big.NewInt(100000000000000)}}}
genesis = gspec.MustCommit(db)
signer = types.NewEIP155Signer(gspec.Config.ChainID)
newEventCh = make(chan bool)
Expand All @@ -3067,7 +3067,7 @@ func testSendingStateChangeEvents(t *testing.T, numberOfEventsToSend int) {

// create numberOfEventsToSend blocks that include State Changes
chain, _ := GenerateChain(params.TestChainConfig, genesis, ethash.NewFaker(), db, numberOfEventsToSend, func(i int, block *BlockGen) {
tx, _ := types.SignTx(types.NewTransaction(block.TxNonce(addr1), addr2, big.NewInt(10000), params.TxGas, nil, nil), signer, key1)
tx, _ := types.SignTx(types.NewTransaction(block.TxNonce(addr1), addr2, big.NewInt(10000), params.TxGas, block.header.BaseFee, nil), signer, key1)
block.AddTx(tx)
})

Expand Down
6 changes: 4 additions & 2 deletions eth/filters/filter_system_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -690,11 +690,13 @@ func flattenLogs(pl [][]*types.Log) []*types.Log {
}

func TestStateChangeSubscription(t *testing.T) {
t.Parallel()

var (
db = rawdb.NewMemoryDatabase()
backend = &testBackend{db: db}
api = NewPublicFilterAPI(backend, false)
genesis = new(core.Genesis).MustCommit(db)
api = NewPublicFilterAPI(backend, false, deadline)
genesis = (&core.Genesis{BaseFee: big.NewInt(params.InitialBaseFee)}).MustCommit(db)
numberOfBlocks = 3
chain, _ = core.GenerateChain(params.TestChainConfig, genesis, ethash.NewFaker(), db, numberOfBlocks, func(i int, gen *core.BlockGen) {})

Expand Down

0 comments on commit 3b3d44c

Please sign in to comment.