Closed salman01zp closed 1 year ago
While creating DkgBridgeRegistryBackend it uses OnlineClient::<PolkadotConfig>::new() method to create a dkg client which by default points to a locally running node on ws://127.0.0.1:9944.
DkgBridgeRegistryBackend
OnlineClient::<PolkadotConfig>::new()
ws://127.0.0.1:9944
pub async fn new() -> Result<OnlineClient<T>, Error> { let url = "ws://127.0.0.1:9944"; OnlineClient::from_url(url).await }
We should connect to the node using the wss URL provided by node configuration with the from_url method.
from_url
pub async fn from_url(url: impl AsRef<str>) -> Result<OnlineClient<T>, Error> { let client = default_rpc_client(url).await?; OnlineClient::from_rpc_client(Arc::new(client)).await }
We also store DKG client in DkgProposalSigningBackend and directly use by making it public.
DkgProposalSigningBackend
pub struct DkgProposalSigningBackend { pub client: DkgClient, pub pair: PairSigner<PolkadotConfig, Sr25519Pair>, pub typed_chain_id: webb_proposals::TypedChainId, }
Closed by #378 #379
Summary
While creating
DkgBridgeRegistryBackend
it usesOnlineClient::<PolkadotConfig>::new()
method to create a dkg client which by default points to a locally running node onws://127.0.0.1:9944
.Solution
We should connect to the node using the wss URL provided by node configuration with the
from_url
method.We also store DKG client in
DkgProposalSigningBackend
and directly use by making it public.