10 Commits

Author SHA1 Message Date
  jw bb49011991
Merge pull request #67 from wowario/lwma2-update 2 years ago
  jw 2e3340df7a
Merge pull request #66 from wowario/testnet-stagenet 2 years ago
  wowario d552924515
Update adapt get_approximate_blockchain_height 2 years ago
  wowario ee07408ce1 Add stagenet ips 2 years ago
  wowario d0d1a14a05 Add stagenet fork heights 2 years ago
  wowario 2da1edf924 Update difficulty 2 years ago
  jw 28b65ea422
Merge pull request #64 from wowario/release-v0.2.1.0 2 years ago
  wowario 2d4c0edd66
Captain obvious warning 2 years ago
  jw a0b47c970c
Merge pull request #63 from fuwa0529/fix-default-mixin 2 years ago
  fuwa 7973af3a3c remove unused default mixin from wallet.cpp 2 years ago
6 changed files with 20 additions and 28 deletions
Split View
  1. +4
    -4
      src/cryptonote_basic/difficulty.cpp
  2. +2
    -10
      src/cryptonote_core/blockchain.cpp
  3. +3
    -0
      src/cryptonote_core/cryptonote_core.cpp
  4. +9
    -2
      src/p2p/net_node.inl
  5. +0
    -10
      src/wallet/api/wallet.cpp
  6. +2
    -2
      src/wallet/wallet2.cpp

+ 4
- 4
src/cryptonote_basic/difficulty.cpp View File

@ -256,9 +256,8 @@ difficulty_type next_difficulty_v3(std::vector 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 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);

+ 2
- 10
src/cryptonote_core/blockchain.cpp View File

@ -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 },
};
//------------------------------------------------------------------

+ 3
- 0
src/cryptonote_core/cryptonote_core.cpp View File

@ -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

+ 9
- 2
src/p2p/net_node.inl View File

@ -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;
}

+ 0
- 10
src/wallet/api/wallet.cpp View File

@ -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)
{

+ 2
- 2
src/wallet/wallet2.cpp View File

@ -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

Loading…
Cancel
Save