Skip to content

Commit a2f5455

Browse files
authored
miner: get rid of test_backend helper functions (#1424)
* 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
1 parent 8a1e0ec commit a2f5455

File tree

5 files changed

+66
-708
lines changed

5 files changed

+66
-708
lines changed

core/txindexer_test.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,9 +71,11 @@ func TestTxIndexer(t *testing.T) {
7171
}
7272
verify := func(db ethdb.Database, expTail uint64, indexer *txIndexer) {
7373
tail := rawdb.ReadTxIndexTail(db)
74+
//nolint: staticcheck
7475
if tail == nil {
7576
t.Fatal("Failed to write tx index tail")
7677
}
78+
//nolint: staticcheck
7779
if *tail != expTail {
7880
t.Fatalf("Unexpected tx index tail, want %v, got %d", expTail, *tail)
7981
}

core/vm/interpreter.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,12 @@ var (
4141
ErrNoCurrentTx = errors.New("no current tx found in interruptCtx")
4242
)
4343

44+
type InterruptKeyType string
45+
4446
const (
4547
// These are keys for the interruptCtx
46-
InterruptCtxDelayKey = "delay"
47-
InterruptCtxOpcodeDelayKey = "opcodeDelay"
48+
InterruptCtxDelayKey InterruptKeyType = "delay"
49+
InterruptCtxOpcodeDelayKey InterruptKeyType = "opcodeDelay"
4850

4951
// InterruptedTxCacheSize is size of lru cache for interrupted txs
5052
InterruptedTxCacheSize = 90000

0 commit comments

Comments
 (0)