mirror of
https://github.com/luxfi/evm.git
synced 2026-09-24 00:27:44 +00:00
Update evm to use consensus/linear refactoring
- Update geth dependency to v0.15.44 with chain->linear refactoring - Fix warptest to use linear.Block instead of chain.Block - Update lineartest import alias
This commit is contained in:
@@ -19,7 +19,7 @@ require (
|
||||
github.com/holiman/billy v0.0.0-20240216141850-2abb0c79d3c4
|
||||
github.com/holiman/bloomfilter/v2 v2.0.3
|
||||
github.com/holiman/uint256 v1.3.2
|
||||
github.com/luxfi/geth v0.15.43
|
||||
github.com/luxfi/geth v0.15.44
|
||||
github.com/luxfi/netrunner v1.7.12
|
||||
github.com/luxfi/node v1.13.20
|
||||
github.com/mattn/go-colorable v0.1.14
|
||||
|
||||
@@ -320,6 +320,8 @@ github.com/leanovate/gopter v0.2.11 h1:vRjThO1EKPb/1NsDXuDrzldR28RLkBflWYcU9CvzW
|
||||
github.com/leanovate/gopter v0.2.11/go.mod h1:aK3tzZP/C+p1m3SPRE4SYZFGP7jjkuSI4f7Xvpt0S9c=
|
||||
github.com/luxfi/geth v0.15.43 h1:Vgpk7iiIingXJIy0nSu85XbQYdh/BdxfbIXcKbHwjbQ=
|
||||
github.com/luxfi/geth v0.15.43/go.mod h1:A1degr56Dg0lPTK8hDLQDZ6GKZ6NZq5G8Q1ko0mqOwQ=
|
||||
github.com/luxfi/geth v0.15.44 h1:TFoBotNJ2UPZqPvBjBHIJjmiB9b6GwGNWTyjGRRXxvY=
|
||||
github.com/luxfi/geth v0.15.44/go.mod h1:A1degr56Dg0lPTK8hDLQDZ6GKZ6NZq5G8Q1ko0mqOwQ=
|
||||
github.com/luxfi/netrunner v1.7.12 h1:DusNxGpg9amhXq1KaVFAyGCPrZ/1YH0+hAbX3uWCZY4=
|
||||
github.com/luxfi/netrunner v1.7.12/go.mod h1:hms50FSf3Hj5+HsdovaIGniTpIOX0JRy6FTTDFmTJ6E=
|
||||
github.com/luxfi/node v1.13.20 h1:X/vWMr1Bzeajt+7bWDPRcz9YlR+CS3A+xzVbfxEVC04=
|
||||
|
||||
@@ -11,16 +11,16 @@ import (
|
||||
"github.com/luxfi/node/database"
|
||||
"github.com/luxfi/node/ids"
|
||||
"github.com/luxfi/node/consensus/linear"
|
||||
"github.com/luxfi/node/consensus/linear/lineartest"
|
||||
"github.com/luxfi/node/consensus/consensustest"
|
||||
lineartest "github.com/luxfi/node/consensus/linear/lineartest"
|
||||
consensustest "github.com/luxfi/node/consensus/consensustest"
|
||||
)
|
||||
|
||||
// EmptyBlockClient returns an error if a block is requested
|
||||
var EmptyBlockClient BlockClient = MakeBlockClient()
|
||||
|
||||
type BlockClient func(ctx context.Context, blockID ids.ID) (chain.Block, error)
|
||||
type BlockClient func(ctx context.Context, blockID ids.ID) (linear.Block, error)
|
||||
|
||||
func (f BlockClient) GetAcceptedBlock(ctx context.Context, blockID ids.ID) (chain.Block, error) {
|
||||
func (f BlockClient) GetAcceptedBlock(ctx context.Context, blockID ids.ID) (linear.Block, error) {
|
||||
return f(ctx, blockID)
|
||||
}
|
||||
|
||||
@@ -28,12 +28,12 @@ func (f BlockClient) GetAcceptedBlock(ctx context.Context, blockID ids.ID) (chai
|
||||
// If a block is requested that isn't part of the provided blocks, an error is
|
||||
// returned.
|
||||
func MakeBlockClient(blkIDs ...ids.ID) BlockClient {
|
||||
return func(_ context.Context, blkID ids.ID) (chain.Block, error) {
|
||||
return func(_ context.Context, blkID ids.ID) (linear.Block, error) {
|
||||
if !slices.Contains(blkIDs, blkID) {
|
||||
return nil, database.ErrNotFound
|
||||
}
|
||||
|
||||
return &chaintest.Block{
|
||||
return &lineartest.Block{
|
||||
Decidable: consensustest.Decidable{
|
||||
IDV: blkID,
|
||||
Status: consensustest.Accepted,
|
||||
|
||||
Reference in New Issue
Block a user