nochowderforyou / clams

Clam Project
MIT License
62 stars 58 forks source link

clam-qt's coincontrol dialog shows incorrect weights #224

Closed dooglus closed 8 years ago

dooglus commented 8 years ago

src/qt/coincontroldialog.cpp uses this code to calculate coin weight:

        // weight
        int weight = floorf((GetTime() - out.tx->GetTxTime()) * out.tx->vout[out.i].nValue / BitcoinUnits::factor(BitcoinUnits::BTC) / (double)(1440 * nTargetStakeSpacing));
        if (weight < 0) weight = 0;
        itemOutput->setText(COLUMN_WEIGHT, strPad(QString::number(weight), 5, " "));
        dWeight += weight;

Weight no longer works like that. And why's the GUI doing these kinds of calculations anyway? Shouldn't that be in the back-end?

creativecuriosity commented 8 years ago

Frankly, I think listing weight in the GUI at all has very little, if any, utility at this point. As it relates to a metric like coin-days, might make a bit more sense - still little utility that I can imagine.

dooglus commented 8 years ago

Do we have anyone who knows their way around the GUI code? I don't, and always feel like I'm guessing when I attempt to change it.

I could probably successfully remove the 'weight' column, but would rather someone with better QT-competence did it.

dooglus commented 8 years ago

I removed the weight column in #225. It was a simple enough change.