BUG! Lost the ZADDRs when encrypt wallet

Maybe I found a BUG!!!
I want to protect the wallet by a paaword. I used the command line :
zcash-cli encryptwallet “Mypassword”
I unlocked the wallet and sent the generated ZEC to a protected address ZADDR and it was success:

./zcash/src/zcash-cli z_getoperationstatus [

    "id" : "opid-6b416666-1409-4f20-84d6-c3867f74aca9",
    "status" : "success",
    "creation_time" : 1473488715,
    "result" : {
        "txid" : "fcdae326a2162e9ec89090ac84d8c89512a019f3d04b7ed93a17969c8b0a749f"
    "execution_secs" : 113.49104076

But I could not find any ZADDR after I rebooted the computer.

./zcash/src/zcash-cli z_listaddresses



./zcash/src/zcash-cli z_getbalance “$ZADDR”

error: {“code”:-5,“message”:“From address does not belong to this node, zaddr spending key not found.”}

Does it seem I lost my protect ZEC?

1 Like

You’ve found a side-case that is not currently handled: If the wallet is encrypted, z-addrs are not persisted. This will be fixed when https://github.com/zcash/zcash/pull/1372 is merged. For now, leave your wallet unencrypted, or back up any z-addrs that you generate using z_exportkey ZADDR.

1 Like