You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// Current deployment head in the database / WritableAgent Mutex cache.
1621
1613
//
1622
1614
// Safe unwrap because in a Revert event we're sure the subgraph has
1623
1615
// advanced at least once.
1624
1616
let subgraph_ptr = self.inputs.store.block_ptr().unwrap();
1625
1617
if revert_to_ptr.number >= subgraph_ptr.number{
1626
1618
info!(&self.logger,"Block to revert is higher than subgraph pointer, nothing to do";"subgraph_ptr" => &subgraph_ptr,"revert_to_ptr" => &revert_to_ptr);
1627
-
returnOk(Action::Continue);
1619
+
returnAction::Continue;
1628
1620
}
1629
1621
1630
1622
info!(&self.logger,"Reverting block to get back to main chain";"subgraph_ptr" => &subgraph_ptr,"revert_to_ptr" => &revert_to_ptr);
@@ -1638,7 +1630,7 @@ where
1638
1630
error!(&self.logger,"Could not revert block. Retrying";"error" => %e);
1639
1631
1640
1632
// Exit inner block stream consumption loop and go up to loop that restarts subgraph
1641
-
returnOk(Action::Restart);
1633
+
returnAction::Restart;
1642
1634
}
1643
1635
1644
1636
self.metrics
@@ -1650,17 +1642,15 @@ where
1650
1642
.deployment_head
1651
1643
.set(subgraph_ptr.numberasf64);
1652
1644
1653
-
self.revert_state_to(revert_to_ptr.number)?;
1645
+
self.revert_state_to(revert_to_ptr.number);
1654
1646
1655
1647
let needs_restart:bool = self.needs_restart(revert_to_ptr, subgraph_ptr);
1656
1648
1657
-
let action = if needs_restart {
1649
+
if needs_restart {
1658
1650
Action::Restart
1659
1651
}else{
1660
1652
Action::Continue
1661
-
};
1662
-
1663
-
Ok(action)
1653
+
}
1664
1654
}
1665
1655
1666
1656
/// Determines if the subgraph needs to be restarted.
0 commit comments