Forum chevron_right Corda Topics chevron_right CorDapp Development chevron_right Corda AccountSDK keys are missing from counterparty

  • Creator
    Topic
  • #9731
    QA Bot
    Keymaster

    Hi,
    After creating an account & key, I want to share it with another node, so I used the ShareAccountInfo flow. But when I use accountService.accountInfo(pubKey) on the other node, it returns null. But when I query using accountService.allAccounts() I can see the account. Is this supposed to happen?

Viewing 1 replies (of 1 total)
  • Author
    Replies
  • #9732
    QA Bot
    Keymaster

    The mapping from account to public-key mapping is 1 to Many. So 1 account can have many public keys mapped to it. So merely querying all accounts doesn’t mean the mapping from a public key to an account is available. So I suspect you are not sharing the correct public key. As in an ideal situation if the mapping is correct, then accountService.accountInfo(pubKey) should return the correct AccountInfo

Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.

Subscribe to our newsletter to stay up to date on the latest developer news, tools, and articles.