Skip to content

Commit

Permalink
Merge branch 'master' into geth-1.13.3
Browse files Browse the repository at this point in the history
  • Loading branch information
joshuacolvin0 authored Jan 26, 2024
2 parents ddefe8b + 3f67f04 commit 2abf48e
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions staker/rollup_watcher.go
Original file line number Diff line number Diff line change
Expand Up @@ -176,16 +176,18 @@ func (r *RollupWatcher) LookupNodeChildren(ctx context.Context, nodeNum uint64,
if node.NodeHash != nodeHash {
return nil, fmt.Errorf("got unexpected node hash %v looking for node number %v with expected hash %v (reorg?)", node.NodeHash, nodeNum, nodeHash)
}
latestChild, err := r.RollupUserLogic.GetNode(r.getCallOpts(ctx), node.LatestChildNumber)
if err != nil {
return nil, err
}
var query = ethereum.FilterQuery{
FromBlock: new(big.Int).SetUint64(node.CreatedAtBlock),
ToBlock: new(big.Int).SetUint64(latestChild.CreatedAtBlock),
Addresses: []common.Address{r.address},
Topics: [][]common.Hash{{nodeCreatedID}, nil, {nodeHash}},
}
query.FromBlock, err = r.getNodeCreationBlock(ctx, nodeNum)
if err != nil {
return nil, err
}
query.ToBlock, err = r.getNodeCreationBlock(ctx, node.LatestChildNumber)
if err != nil {
return nil, err
}
logs, err := r.client.FilterLogs(ctx, query)
if err != nil {
return nil, err
Expand Down

0 comments on commit 2abf48e

Please sign in to comment.