Commit 82990cb
fix(provider): historical provider doesn't respect pinned block number (#360)
The fork version of the `HistoricalStateProvider` should falls back to requesting data from the forked network ONLY when the pinned block number (i.e., the block number the `HistoricalStateProvider` is created for - the `block_id` given to `<ForkedProvider as
StateFactoryProvider>::historical`) is less than or equal to the block number which katana is forked at.
Currently, `HistoricalStateProvider` would immediately falls back to the forked network. The request is then handled by the `Backend` and `Backend` is pinned to the forked block number and not the block number the state provider is for.1 parent de73a3d commit 82990cb
File tree
5 files changed
+207
-124
lines changed- crates
- core/src/backend
- primitives/src
- storage
- fork/src
- provider/provider/src/providers/fork
5 files changed
+207
-124
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
141 | 141 | | |
142 | 142 | | |
143 | 143 | | |
144 | | - | |
| 144 | + | |
145 | 145 | | |
146 | 146 | | |
147 | 147 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
52 | 52 | | |
53 | 53 | | |
54 | 54 | | |
55 | | - | |
| 55 | + | |
56 | 56 | | |
57 | 57 | | |
58 | 58 | | |
| |||
0 commit comments