Skip to content

Commit

Permalink
format
Browse files Browse the repository at this point in the history
  • Loading branch information
ricomateo authored and samlaf committed Sep 24, 2024
1 parent a222b16 commit ee8933b
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions chainio/clients/avsregistry/reader.go
Original file line number Diff line number Diff line change
Expand Up @@ -432,7 +432,8 @@ func (r *ChainReader) QueryExistingRegisteredOperatorPubKeys(
// QueryExistingRegisteredOperatorPubKeys and QueryExistingRegisteredOperatorSockets
// both run in parallel and they read and mutate the same variable startBlock,
// so we clone it to prevent the race condition.
// TODO: we might want to eventually change the function signature to pass a uint, but that would be a breaking change
// TODO: we might want to eventually change the function signature to pass a uint,
// but that would be a breaking change
for i := new(big.Int).Set(startBlock); i.Cmp(stopBlock) <= 0; i.Add(i, blockRange) {
// Subtract 1 since FilterQuery is inclusive
toBlock := big.NewInt(0).Add(i, big.NewInt(0).Sub(blockRange, big.NewInt(1)))
Expand Down Expand Up @@ -528,7 +529,8 @@ func (r *ChainReader) QueryExistingRegisteredOperatorSockets(
// QueryExistingRegisteredOperatorPubKeys and QueryExistingRegisteredOperatorSockets
// both run in parallel and they read and mutate the same variable startBlock,
// so we clone it to prevent the race condition.
// TODO: we might want to eventually change the function signature to pass a uint, but that would be a breaking change
// TODO: we might want to eventually change the function signature to pass a uint,
// but that would be a breaking change
for i := new(big.Int).Set(startBlock); i.Cmp(stopBlock) <= 0; i.Add(i, blockRange) {
// Subtract 1 since FilterQuery is inclusive
toBlock := big.NewInt(0).Add(i, big.NewInt(0).Sub(blockRange, big.NewInt(1)))
Expand Down

0 comments on commit ee8933b

Please sign in to comment.