-<?xml version="1.0" encoding="utf-8"?>
+\feff<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
</PreBuildEvent>
</ItemDefinitionGroup>
<ItemGroup>
+ <ClCompile Include="..\..\src\kernelrecord.cpp" />
<ClCompile Include="..\..\src\qt\aboutdialog.cpp" />
<ClCompile Include="..\..\src\qt\addressbookpage.cpp" />
<ClCompile Include="..\..\src\qt\addresstablemodel.cpp" />
<ClCompile Include="build\moc_mintingfilterproxy.cpp">
<Filter>Generated Files</Filter>
</ClCompile>
+ <ClCompile Include="..\..\src\kernelrecord.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
</ItemGroup>
<ItemGroup>
<CustomBuild Include="..\..\src\qt\aboutdialog.h">
double KernelRecord::getProbToMintStake(double difficulty, int timeOffset) const
{
- double maxTarget = pow(static_cast<double>(2), 224);
- double target = maxTarget / difficulty;
- int dayWeight = (min((GetAdjustedTime() - nTime) + timeOffset, (int64)(nStakeMinAge+nStakeMaxAge)) - nStakeMinAge) / 86400;
- uint64 coinAge = max(nValue * dayWeight / COIN, (int64)0);
- return target * coinAge / pow(static_cast<double>(2), 256);
+ //double maxTarget = pow(static_cast<double>(2), 224);
+ //double target = maxTarget / difficulty;
+ //int dayWeight = (min((GetAdjustedTime() - nTime) + timeOffset, (int64)(nStakeMinAge+nStakeMaxAge)) - nStakeMinAge) / 86400;
+ //uint64 coinAge = max(nValue * dayWeight / COIN, (int64)0);
+ //return target * coinAge / pow(static_cast<double>(2), 256);
+ int Weight = (min((GetAdjustedTime() - nTime) + timeOffset, (int64)(nStakeMinAge+nStakeMaxAge)) - nStakeMinAge);
+ uint64 coinAge = max(nValue * Weight / (COIN * 86400), (int64)0);
+ return coinAge / (pow(static_cast<double>(2),32) * difficulty);
}
double KernelRecord::getProbToMintWithinNMinutes(double difficulty, int minutes)
if(!updated.empty())
{
priv->updateWallet(updated);
- priv->refreshWallet();
}
}
wtx.MarkSpent(txin.prevout.n);
wtx.WriteToDisk();
NotifyTransactionChanged(this, txin.prevout.hash, CT_UPDATED);
+ vMintingWalletUpdated.push_back(txin.prevout.hash);
}
}
}
wtx.MarkUnspent(&txout - &tx.vout[0]);
wtx.WriteToDisk();
NotifyTransactionChanged(this, hash, CT_UPDATED);
+ vMintingWalletUpdated.push_back(hash);
}
}
}
// Notify UI of new or updated transaction
NotifyTransactionChanged(this, hash, fInsertedNew ? CT_NEW : CT_UPDATED);
-
+ vMintingWalletUpdated.push_back(hash);
// notify an external script when a wallet transaction comes in or is updated
std::string strCmd = GetArg("-walletnotify", "");
coin.MarkSpent(txin.prevout.n);
coin.WriteToDisk();
NotifyTransactionChanged(this, coin.GetHash(), CT_UPDATED);
+ vMintingWalletUpdated.push_back(coin.GetHash());
}
if (fFileBacked)