Skip to content

Commit

Permalink
fix: check subgraph before closing allocations (#435)
Browse files Browse the repository at this point in the history
  • Loading branch information
gusinacio authored Oct 30, 2024
1 parent 7116ca5 commit a3cc07e
Show file tree
Hide file tree
Showing 4 changed files with 259 additions and 12 deletions.
23 changes: 23 additions & 0 deletions graphql/closed_allocations.query.graphql
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
query ClosedAllocations(
$allocation_ids: [ID!]!,
$block: Block_height,
$first: Int!,
$last: ID!,
) {
meta: _meta(block: $block) { block { number hash timestamp } }
allocations(
block: $block
orderBy: id
orderDirection: asc
first: $first
where: {
and: [
{ closedAt_not: null }
{ id_gt: $last }
{ id_in: $allocation_ids }
]
}
) {
id
}
}
1 change: 1 addition & 0 deletions tap-agent/src/agent.rs
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@ pub async fn start_agent() -> (ActorRef<SenderAccountsManagerMessage>, JoinHandl
indexer_allocations,
escrow_accounts,
escrow_subgraph,
network_subgraph,
sender_aggregator_endpoints: sender_aggregator_endpoints.clone(),
prefix: None,
};
Expand Down
Loading

0 comments on commit a3cc07e

Please sign in to comment.