I have a valid base58 address that I got using getnewaddress command.
I'm trying to convert it to CKeyID object but I have some difficulties.
The problematic code:
string sKey = "my_address"; // it's not the real address
std::vector<unsigned char> prefix = std::vector<unsigned char>(1,5);
CTxDestination dest = ::DecodeAddressDestination(sKey, prefix);
CScript script = GetScriptForDestination(dest);
CKeyID key = CKeyID(script);
At the debugging I can see that
dest value is
ScriptHashWhat I'm doing wrong?