mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-24 05:36:46 +00:00
patch to resolve instant-verifier testhelper error
This commit is contained in:
parent
612c9e0f4a
commit
d95bd50ada
2 changed files with 20 additions and 0 deletions
|
|
@ -158,6 +158,11 @@ func (c *SimulatedBeacon) Stop() error {
|
|||
return nil
|
||||
}
|
||||
|
||||
// Oasys: Returns the simulated Ethereum.
|
||||
func (c *SimulatedBeacon) Ethereum() *eth.Ethereum {
|
||||
return c.eth
|
||||
}
|
||||
|
||||
// sealBlock initiates payload building for a new block and creates a new block
|
||||
// with the completed payload.
|
||||
func (c *SimulatedBeacon) sealBlock(withdrawals []*types.Withdrawal, timestamp uint64) error {
|
||||
|
|
|
|||
|
|
@ -29,6 +29,7 @@ import (
|
|||
"github.com/ethereum/go-ethereum/eth/ethconfig"
|
||||
"github.com/ethereum/go-ethereum/eth/filters"
|
||||
"github.com/ethereum/go-ethereum/ethclient"
|
||||
"github.com/ethereum/go-ethereum/ethclient/gethclient"
|
||||
"github.com/ethereum/go-ethereum/node"
|
||||
"github.com/ethereum/go-ethereum/p2p"
|
||||
"github.com/ethereum/go-ethereum/params"
|
||||
|
|
@ -62,6 +63,8 @@ type simClient struct {
|
|||
// Backend is a simulated blockchain. You can use it to test your contracts or
|
||||
// other code that interacts with the Ethereum chain.
|
||||
type Backend struct {
|
||||
gethclient *gethclient.Client // Added by Oasys
|
||||
|
||||
node *node.Node
|
||||
beacon *catalyst.SimulatedBeacon
|
||||
client simClient
|
||||
|
|
@ -129,6 +132,8 @@ func newWithNode(stack *node.Node, conf *eth.Config, blockPeriod uint64) (*Backe
|
|||
return nil, err
|
||||
}
|
||||
return &Backend{
|
||||
gethclient: gethclient.New(stack.Attach()), // Added by Oasys
|
||||
|
||||
node: stack,
|
||||
beacon: beacon,
|
||||
client: simClient{ethclient.NewClient(stack.Attach())},
|
||||
|
|
@ -190,3 +195,13 @@ func (n *Backend) AdjustTime(adjustment time.Duration) error {
|
|||
func (n *Backend) Client() Client {
|
||||
return n.client
|
||||
}
|
||||
|
||||
// Oasys: GethClient returns a gethclient that accesses the simulated chain.
|
||||
func (n *Backend) GethClient() *gethclient.Client {
|
||||
return n.gethclient
|
||||
}
|
||||
|
||||
// Oasys: Blockchain returns the simulated chain.
|
||||
func (n *Backend) Blockchain() *core.BlockChain {
|
||||
return n.beacon.Ethereum().BlockChain()
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue