Skip to content

Commit

Permalink
Merge pull request #92 from eniac-x-labs/feature/bug-fix
Browse files Browse the repository at this point in the history
fix polygon
  • Loading branch information
tiantianlikeu authored Mar 21, 2024
2 parents dab1981 + d0f5795 commit d69dbab
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 16 deletions.
29 changes: 19 additions & 10 deletions acorus.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,16 +45,25 @@ rpcs:
# header_buffer_size: 20
# contracts:
# event_contracts:
- rpc_url: 'https://testnet-rpc.zkfair.io'
chain_id: 43851
start_block: 2377471
l1_chain_id: 11155111
is_mainnet: false
l1_pool_contract: ""
l2_pool_contract: ""
header_buffer_size: 20
contracts:
event_contracts:
# - rpc_url: 'https://testnet-rpc.zkfair.io'
# chain_id: 43851
# start_block: 2377471
# l1_chain_id: 11155111
# is_mainnet: false
# l1_pool_contract: ""
# l2_pool_contract: ""
# header_buffer_size: 20
# contracts:
# event_contracts:- rpc_url: 'https://testnet-rpc.zkfair.io'
# chain_id: 43851
# start_block: 2377471
# l1_chain_id: 11155111
# is_mainnet: false
# l1_pool_contract: ""
# l2_pool_contract: ""
# header_buffer_size: 20
# contracts:
# event_contracts:

# - rpc_url: ''
# chain_id: 169
Expand Down
12 changes: 6 additions & 6 deletions synchronizer/node/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -169,9 +169,9 @@ func (c *clnt) BlockHeadersByRange(startHeight, endHeight *big.Int, chainId uint
ctxwt, cancel := context.WithTimeout(context.Background(), defaultRequestTimeout)
defer cancel()

if chainId == uint(global_const.PolygonChainId) ||
chainId == uint(global_const.PolygonSepoliaChainId) ||
chainId == uint(global_const.ZkFairSepoliaChainId) ||
//chainId == uint(global_const.PolygonChainId) ||
// chainId == uint(global_const.PolygonSepoliaChainId) ||
if chainId == uint(global_const.ZkFairSepoliaChainId) ||
chainId == uint(global_const.ZkFairChainId) {
groupSize := 100
var wg sync.WaitGroup
Expand Down Expand Up @@ -300,9 +300,9 @@ func (c *clnt) FilterLogs(query ethereum.FilterQuery, chainId uint) (Logs, error
defer cancel()
//resultHeader := new(types.Header)
//resultLogs := make([]types.Log, 0)
if chainId == uint(global_const.PolygonChainId) ||
chainId == uint(global_const.PolygonSepoliaChainId) ||
chainId == uint(global_const.ZkFairSepoliaChainId) ||
//chainId == uint(global_const.PolygonChainId) ||
// chainId == uint(global_const.PolygonSepoliaChainId) ||
if chainId == uint(global_const.ZkFairSepoliaChainId) ||
chainId == uint(global_const.ZkFairChainId) {

batchElems[0].Error = c.rpc.CallContext(ctxwt, &header, batchElems[0].Method, toBlockNumArg(query.ToBlock), false)
Expand Down

0 comments on commit d69dbab

Please sign in to comment.