fix: add ClassVar annotation to genesis_candidates in ChainSettings
Some checks failed
Blockchain Synchronization Verification / sync-verification (push) Failing after 10s
Integration Tests / test-service-integration (push) Has started running
Python Tests / test-python (push) Has been cancelled
Multi-Node Blockchain Health Monitoring / health-check (push) Failing after 14s
Security Scanning / security-scan (push) Has been cancelled
P2P Network Verification / p2p-verification (push) Successful in 7s
Some checks failed
Blockchain Synchronization Verification / sync-verification (push) Failing after 10s
Integration Tests / test-service-integration (push) Has started running
Python Tests / test-python (push) Has been cancelled
Multi-Node Blockchain Health Monitoring / health-check (push) Failing after 14s
Security Scanning / security-scan (push) Has been cancelled
P2P Network Verification / p2p-verification (push) Successful in 7s
Pydantic v2 requires all class attributes to be annotated. genesis_candidates is a class-level constant, not a field, so it should be annotated as ClassVar.
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
from __future__ import annotations
|
||||
|
||||
from pathlib import Path
|
||||
from typing import Optional
|
||||
from typing import Optional, ClassVar
|
||||
import uuid
|
||||
|
||||
from aitbc.constants import DATA_DIR, KEYSTORE_DIR
|
||||
@@ -71,7 +71,7 @@ class ChainSettings(BaseSettings):
|
||||
|
||||
# Sync settings
|
||||
trusted_proposers: str = "" # comma-separated list of trusted proposer IDs
|
||||
genesis_candidates = [
|
||||
genesis_candidates: ClassVar[list[str]] = [
|
||||
str(DATA_DIR / 'data' / 'genesis.json'),
|
||||
f"{DATA_DIR}/data/{chain_id}/genesis.json",
|
||||
f'{DATA_DIR}/data/ait-mainnet/genesis.json',
|
||||
|
||||
Reference in New Issue
Block a user