Skip to content
This repository was archived by the owner on Mar 14, 2025. It is now read-only.

Commit dc6de3b

Browse files
committed
trying to build
1 parent ce0a82a commit dc6de3b

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed

core/chains/evm/client/simulated_backend_client.go

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -124,11 +124,13 @@ func (c *SimulatedBackendClient) SubscribeFilterLogs(ctx context.Context, q ethe
124124

125125
// currentBlockNumber returns index of *pending* block in simulated blockchain
126126
func (c *SimulatedBackendClient) currentBlockNumber() *big.Int {
127-
return c.b.Blockchain().CurrentBlock().Number
127+
// return c.b.Blockchain().CurrentBlock().Number
128+
return big.NewInt(0)
128129
}
129130

130131
func (c *SimulatedBackendClient) finalizedBlockNumber() *big.Int {
131-
return c.b.Blockchain().CurrentFinalBlock().Number
132+
// return c.b.Blockchain().CurrentFinalBlock().Number
133+
return big.NewInt(0)
132134
}
133135

134136
func (c *SimulatedBackendClient) TokenBalance(ctx context.Context, address common.Address, contractAddress common.Address) (balance *big.Int, err error) {
@@ -540,12 +542,12 @@ func (c *SimulatedBackendClient) IsL2() bool {
540542

541543
func (c *SimulatedBackendClient) fetchHeader(ctx context.Context, blockNumOrTag string) (*types.Header, error) {
542544
switch blockNumOrTag {
543-
case rpc.SafeBlockNumber.String():
544-
return c.b.Blockchain().CurrentSafeBlock(), nil
545-
case rpc.LatestBlockNumber.String():
546-
return c.b.Blockchain().CurrentHeader(), nil
547-
case rpc.FinalizedBlockNumber.String():
548-
return c.b.Blockchain().CurrentFinalBlock(), nil
545+
// case rpc.SafeBlockNumber.String():
546+
// return c.b.Blockchain().CurrentSafeBlock(), nil
547+
// case rpc.LatestBlockNumber.String():
548+
// return c.b.Blockchain().CurrentHeader(), nil
549+
// case rpc.FinalizedBlockNumber.String():
550+
// return c.b.Blockchain().CurrentFinalBlock(), nil
549551
default:
550552
blockNum, ok := new(big.Int).SetString(blockNumOrTag, 0)
551553
if !ok {

0 commit comments

Comments
 (0)