fix: add default_peer_rpc_url for bulk sync fallback
Some checks failed
Blockchain Synchronization Verification / sync-verification (push) Failing after 3s
Integration Tests / test-service-integration (push) Successful in 11s
P2P Network Verification / p2p-verification (push) Successful in 2s
Python Tests / test-python (push) Successful in 19s
Security Scanning / security-scan (push) Successful in 33s
Multi-Node Blockchain Health Monitoring / health-check (push) Has been cancelled
Some checks failed
Blockchain Synchronization Verification / sync-verification (push) Failing after 3s
Integration Tests / test-service-integration (push) Successful in 11s
P2P Network Verification / p2p-verification (push) Successful in 2s
Python Tests / test-python (push) Successful in 19s
Security Scanning / security-scan (push) Successful in 33s
Multi-Node Blockchain Health Monitoring / health-check (push) Has been cancelled
- Add default_peer_rpc_url configuration parameter - Update bulk sync fallback to use default_peer_rpc_url instead of gossip_broadcast_url - Fixes 'unsupported protocol redis://' error in bulk sync - gossip_broadcast_url is for Redis backend, not HTTP RPC calls
This commit is contained in:
@@ -79,6 +79,7 @@ class ChainSettings(BaseSettings):
|
||||
|
||||
gossip_backend: str = "memory"
|
||||
gossip_broadcast_url: Optional[str] = None
|
||||
default_peer_rpc_url: Optional[str] = None # HTTP RPC URL of default peer for bulk sync
|
||||
|
||||
# NAT Traversal (STUN/TURN)
|
||||
stun_servers: str = "" # Comma-separated STUN server addresses (e.g., "stun.l.google.com:19302,jitsi.example.com:3478")
|
||||
|
||||
@@ -158,8 +158,8 @@ class BlockchainNode:
|
||||
# Get source URL from block metadata if available
|
||||
source_url = block_data.get("source_url")
|
||||
if not source_url:
|
||||
# Fallback to default peer URL from gossip backend
|
||||
source_url = settings.gossip_broadcast_url
|
||||
# Fallback to default peer RPC URL
|
||||
source_url = settings.default_peer_rpc_url
|
||||
|
||||
if source_url:
|
||||
try:
|
||||
|
||||
Reference in New Issue
Block a user