| 33 | |
| 34 | impl<E: Clock + Storage + Metrics, V: Variant> FinalizerState<E, V> { |
| 35 | pub async fn new( |
| 36 | context: E, |
| 37 | cfg: Config<EightCap, ((), ())>, |
| 38 | cancellation_token: CancellationToken, |
| 39 | ) -> Self { |
| 40 | let store = Db::<_, FixedBytes<64>, Value<V>, EightCap>::init(context, cfg) |
| 41 | .await |
| 42 | .expect("failed to initialize unified store"); |
| 43 | |
| 44 | Self { |
| 45 | store, |
| 46 | cancellation_token, |
| 47 | } |
| 48 | } |
| 49 | |
| 50 | /// Log a database error, initiate graceful shutdown, and return the error so callers |
| 51 | /// can propagate it and fence any consensus-critical side effects that must not run on |