nochowderforyou / clams

Clam Project
MIT License
61 stars 58 forks source link

clamd crashes when an address we don't own stakes to an address we own... #226

Closed dooglus closed 9 years ago

dooglus commented 9 years ago

... if creditstakestoaccounts=1 is set

This code is to blame:

    wtx.GetAmounts(listReceived, listSent, nFee, strSentAccount);

    // count staking reward in the appropriate account
    if (wtx.IsCoinStake()) {
        if (fCreditStakesToAccounts) {
            CTxDestination td(listSent.front().first);

When the staking address isn't ours, listSent is empty, and so it has no front().