glv2 / peercoin

Community Peercoin client development tree
http://www.peercoin.net
MIT License
4 stars 0 forks source link

no address/account in listunspent #1

Closed kac- closed 10 years ago

kac- commented 10 years ago

address/account info is part of bitcoind listunspent reply to fix it just put in https://github.com/glv2/peercoin/blob/rpc-rawtransaction/src/bitcoinrpc.cpp#L2753 standard ExtractDestination.. code

    entry.push_back(Pair("vout", out.i));
    CTxDestination address;
    if (ExtractDestination(out.tx->vout[out.i].scriptPubKey, address))
    {
        entry.push_back(Pair("address", CBitcoinAddress(address).ToString()));
        if (pwallet->mapAddressBook.count(address))
            entry.push_back(Pair("account", pwallet->mapAddressBook[address]));
    }
    entry.push_back(Pair("scriptPubKey", HexStr(pk.begin(), pk.end())));
glv2 commented 10 years ago

I added it. Thanks for the code.