Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix offchain created from offchain (#5051)
* refactor: Refactor SubgraphInstance::new_host * refactor: Move `Hosts` to a module of `instance` * refactor: Use `mod.rs` style for context and instance * refactor: Make `mod instance` private to `context` * fix(offchain): Separate onchain and offchain hosts The hosts Vec expected the hosts to be pushed in ascending order of block number. Creating a file ds B within another file ds A violated that assumption, because B will have the same creation block as A. This is by design, so the cleanest way to fix this seemed to be separating the data structures for onchain and offchain hosts. Offchain data sources do not need to maintain insertion order, as their processing order ultimately does not impact determinism because they each have their own causality region. If in the future we introduce a feature that allows two different offchain data sources to have the same causality region, we maybe need to revisit this. * fix: Fix an optimize `*Host::contains`, rename iter_by_address
- Loading branch information