Skip to content

Commit

Permalink
miner: get rid of test_backend helper functions (#1424)
Browse files Browse the repository at this point in the history
* initial work for removing tracing from worker

* fix more things

* miner: sync code with worker.go, remove traces

* fix lint

* miner, core: get rid of test_backend helper functions

* miner: handle delay during tests in block building

* fix lint

* miner: reset context to get rid of parent timeout context

* miner: refactor test
  • Loading branch information
manav2401 authored Jan 30, 2025
1 parent 8a1e0ec commit a2f5455
Show file tree
Hide file tree
Showing 5 changed files with 66 additions and 708 deletions.
2 changes: 2 additions & 0 deletions core/txindexer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,11 @@ func TestTxIndexer(t *testing.T) {
}
verify := func(db ethdb.Database, expTail uint64, indexer *txIndexer) {
tail := rawdb.ReadTxIndexTail(db)
//nolint: staticcheck
if tail == nil {
t.Fatal("Failed to write tx index tail")
}
//nolint: staticcheck
if *tail != expTail {
t.Fatalf("Unexpected tx index tail, want %v, got %d", expTail, *tail)
}
Expand Down
6 changes: 4 additions & 2 deletions core/vm/interpreter.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,12 @@ var (
ErrNoCurrentTx = errors.New("no current tx found in interruptCtx")
)

type InterruptKeyType string

const (
// These are keys for the interruptCtx
InterruptCtxDelayKey = "delay"
InterruptCtxOpcodeDelayKey = "opcodeDelay"
InterruptCtxDelayKey InterruptKeyType = "delay"
InterruptCtxOpcodeDelayKey InterruptKeyType = "opcodeDelay"

// InterruptedTxCacheSize is size of lru cache for interrupted txs
InterruptedTxCacheSize = 90000
Expand Down
Loading

0 comments on commit a2f5455

Please sign in to comment.