Files
evm/sync/handlers/test_providers.go
zeekay 8bc9dd01a8 Fix CI: Go version and script permissions
- Change Go version from 1.24.6 to 1.22.8 (stable version)
- Ensure all build scripts have executable permissions
- Fix covdata issue by using stable Go version
- CI should now pass all checks
2025-09-19 05:56:47 +00:00

32 lines
719 B
Go

// Copyright (C) 2019-2025, Lux Industries, Inc. All rights reserved.
// See the file LICENSE for licensing terms.
package handlers
import (
"github.com/luxfi/evm/core/state/snapshot"
"github.com/luxfi/geth/common"
"github.com/luxfi/geth/core/types"
)
var (
_ BlockProvider = (*TestBlockProvider)(nil)
_ SnapshotProvider = (*TestSnapshotProvider)(nil)
)
type TestBlockProvider struct {
GetBlockFn func(common.Hash, uint64) *types.Block
}
func (t *TestBlockProvider) GetBlock(hash common.Hash, number uint64) *types.Block {
return t.GetBlockFn(hash, number)
}
type TestSnapshotProvider struct {
Snapshot *snapshot.Tree
}
func (t *TestSnapshotProvider) Snapshots() *snapshot.Tree {
return t.Snapshot
}