コミットを比較

...

10 コミット

@ -256,9 +256,8 @@ difficulty_type next_difficulty_v3(std::vector<std::uint64_t> timestamps, std::v
// TODO: change initial_difficulty_guess before v9 mainnet hard fork
// if ( height >= fork_height && height <= fork_height+N ) { return difficulty_guess; }
uint64_t initial_difficulty_guess = 100;
if (timestamps.size() <= static_cast<uint64_t>(N)) {
return initial_difficulty_guess;
}
if (timestamps.size() <= 6 ) { return initial_difficulty_guess; }
else if ( timestamps.size() < static_cast<uint64_t>(N +1) ) { N=timestamps.size()-1; }
for ( int64_t i = 1; i <= N; i++) {
ST = std::max(-FTL, std::min( (int64_t)(timestamps[i]) - (int64_t)(timestamps[i-1]), 6*T));
@ -266,9 +265,10 @@ difficulty_type next_difficulty_v3(std::vector<std::uint64_t> timestamps, std::v
if ( i > N-3 ) { sum_3_ST += ST; }
}
next_D = ((cumulative_difficulties[N] - cumulative_difficulties[0])*T*(N+1)*99)/(100*2*L);
next_D = ((int64_t)(cumulative_difficulties[N] - cumulative_difficulties[0])*T*(N+1)*99)/(100*2*L);
prev_D = cumulative_difficulties[N] - cumulative_difficulties[N-1];
next_D = std::max((prev_D*67)/100, std::min( next_D, (prev_D*150)/100));
if ( sum_3_ST < (8*T)/10) { next_D = (prev_D*110)/100; }
return static_cast<uint64_t>(next_D);

@ -116,16 +116,8 @@ static const struct {
uint8_t threshold;
time_t time;
} stagenet_hard_forks[] = {
// version 1 from the start of the blockchain
{ 1, 1, 0, 1341378000 },
// versions 2-7 in rapid succession from March 13th, 2018
{ 2, 32000, 0, 1521000000 },
{ 3, 33000, 0, 1521120000 },
{ 4, 34000, 0, 1521240000 },
{ 5, 35000, 0, 1521360000 },
{ 6, 36000, 0, 1521480000 },
{ 7, 37000, 0, 1521600000 },
{ 7, 1, 0, 1519605000 },
{ 8, 10, 0, 1530621606 },
};
//------------------------------------------------------------------

@ -1359,6 +1359,9 @@ namespace cryptonote
MGINFO_YELLOW(ENDL << "**********************************************************************" << ENDL
<< main_message << ENDL
<< ENDL
<< "Caution: Wownero is highly experimental software compiled by a ragtag team of stoners with as much" << ENDL
<< "skill as Verge developers. Storing your life savings in WOW is probably not a good idea." << ENDL
<< ENDL
<< "You can set the level of process detailization through \"set_log <level|categories>\" command," << ENDL
<< "where <level> is between 0 (no details) and 4 (very verbose), or custom category based levels (eg, *:WARNING)." << ENDL
<< ENDL

@ -372,13 +372,20 @@ namespace nodetool
if (nettype == cryptonote::TESTNET) {
full_addrs.insert("206.189.166.14:11180");
full_addrs.insert("104.236.48.55:11180");
} else {
}
else if (nettype == cryptonote::STAGENET)
{
full_addrs.insert("206.189.166.14:38080");
full_addrs.insert("104.236.48.55:38080");
}
else
{
full_addrs.insert("66.70.218.230:34567");
full_addrs.insert("34.209.48.213:34567");
full_addrs.insert("159.65.91.59:34567");
full_addrs.insert("138.197.31.246:34567");
}
return full_addrs;
}

@ -60,7 +60,6 @@ namespace Monero {
namespace {
// copy-pasted from simplewallet
static const size_t DEFAULT_MIXIN = 9;
static const int DEFAULT_REFRESH_INTERVAL_MILLIS = 1000 * 10;
// limit maximum refresh interval as one minute
static const int MAX_REFRESH_INTERVAL_MILLIS = 1000 * 60 * 1;
@ -1406,15 +1405,6 @@ void WalletImpl::setListener(WalletListener *l)
m_wallet2Callback->setListener(l);
}
uint32_t WalletImpl::defaultMixin() const
{
return m_wallet->default_mixin();
}
void WalletImpl::setDefaultMixin(uint32_t arg)
{
m_wallet->default_mixin(arg);
}
bool WalletImpl::setUserNote(const std::string &txid, const std::string &note)
{

@ -9142,9 +9142,9 @@ uint64_t wallet2::get_daemon_blockchain_target_height(string &err)
uint64_t wallet2::get_approximate_blockchain_height() const
{
// time of v8 fork
const time_t fork_time = m_nettype == TESTNET ? 1529020649 : 1524622167;
const time_t fork_time = m_nettype == TESTNET ? 1530634467 : m_nettype == STAGENET ? 1530635153 : 1524622167;
// v8 fork block
const uint64_t fork_block = m_nettype == TESTNET ? 10 : 6969;
const uint64_t fork_block = m_nettype == TESTNET ? 10 : m_nettype == STAGENET ? 10 : 6969;
// avg seconds per block
const int seconds_per_block = DIFFICULTY_TARGET_V2;
// Calculated blockchain height

読み込み中…
キャンセル
保存