Skip to content

Commit

Permalink
Checkpoints added
Browse files Browse the repository at this point in the history
  • Loading branch information
furiousteam committed Dec 5, 2018
1 parent fb45d75 commit b8d59ed
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 4 deletions.
5 changes: 3 additions & 2 deletions src/WalletService/WalletService.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// Copyright (c) 2012-2017, The CryptoNote developers, The Bytecoin developers
// Copyright (c) 2014-2018, The Monero Project
// Copyright (c) 2018, The TurtleCoin Developers
// Copyright (c) 2018, The BLOC Developers
//
// Please see the included LICENSE file for more information.

Expand Down Expand Up @@ -1198,15 +1199,15 @@ wallets.clear();
wallets.reserve(addresses.size());
for (const std::string& address: addresses) {
uint64_t threshold = wallet.getActualBalance(address);
uint64_t bestThreshold = wallet.getActualBalance(address);
//uint64_t bestThreshold = wallet.getActualBalance(address);
size_t optimizable = 0;
while (threshold > CryptoNote::parameters::MINIMUM_FEE)
{
CryptoNote::IFusionManager::EstimateResult r = fusionManager.estimate(threshold, { address });
if (r.fusionReadyCount > optimizable)
{
optimizable = r.fusionReadyCount;
bestThreshold = threshold;
// bestThreshold = threshold;
}
threshold /= 2;
}
Expand Down
29 changes: 28 additions & 1 deletion src/config/CryptoNoteCheckpoints.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// Copyright (c) 2012-2017, The CryptoNote developers, The Bytecoin developers
// Copyright (c) 2018, The TurtleCoin developers, The BLOC developers
//
// This file is part of Bytecoin.
//
Expand Down Expand Up @@ -27,6 +28,32 @@ struct CheckpointData {
};

const std::initializer_list<CheckpointData> CHECKPOINTS = {
{ 10000000, "7fb97df81221dd1366051b2d0bc7f49c66c22ac4431d879c895b06d66ef66f4c"}
{ 0, "acd5682403287ad25d94769adb80fbcd45de591ecfd5c86d5176bb9a10ff5baa"},
{ 5000, "9474c4e9cceaa0590db12ab3aec16aa75608a9626fded74c5f77bee6e29eb20e"},
{ 10000, "2e9dd1609e8b3d4266d924bd91db6e329fdfc796dc837bbd4b685ba97fd12280"},
{ 15000, "7eaabd7accc631f74a46b7f3f1b94d3e52616c3c8418a9f622b7dc968ac5cd9c"},
{ 20000, "0af44a47302857171c9b8410b4215214b1da833eb90c695d3aa2e544824d2471"},
{ 25000, "238b42a3573ec43352a3aa9ee82c4b33e539a1ea29fa740e0a85c5bfbc974c33"},
{ 30000, "6fd1c2960dc5c6c83f4864d690d124614f9d538ad7ac798276a30035e2f144da"},
{ 35000, "65fcee298fbc2cc9297ee3ec60cd186296775b03074cafc21ef53dfaa91a31d8"},
{ 40000, "f3470ae01eedc1456e7c41c57367cfd2e9fa29439e05aee1571532e18f75bfe4"},
{ 45000, "014d3a57cfe8c55b198abc96464598261ce9a658a471c0bf2c864543056eed2d"},
{ 50000, "49ed4e36995ff484963e32fe360cea1ba504d802bbe00f9fe2ff5266f70a9c2b"},
{ 55000, "29fb42abbdb27ae3284b45fdcba976b45c4f3ddeb1f0779df2abd85370bc6df5"},
{ 60000, "7f398b91508a52f821b23a8c614b39b29c0c499469843c7c43b793dcc10615ca"},
{ 65000, "24c9cb23127315ff37fe671c8d193198e0fb3ec3da18879a5b1be4f89ceabe4e"},
{ 70000, "43a4ed17f126b53156d332c326e2b5b75691138d1f2eb7f35f879ce444c77cc1"},
{ 75000, "fda2c01388ba77cc77db93a9a490b5619c28e0ac86c2336ae9599672f3e3d598"},
{ 80000, "281381b37cec73101c8b646caf002205ac3b76920f774aafb09df025166d55dd"},
{ 85000, "5727b77b2a644945d4405c8fe0f2251827b7d1b4ee9acd5dc38f917ff01cb23f"},
{ 90000, "5c63f3676e215eab0a6b77ddd3f2a46b8f3bddc934f6ef8596fd90f38824962f"},
{ 95000, "808e9e42c9d69bc4124fd9ee5fc0b2f0c0016c54df15e1ff399acea2262ce548"},
{ 100000, "e026316d0b95436a7d3d36247fc8adb5fcb342015eccc239b346a7e2fd64c262"},
{ 105000, "5860a2b4516555202fb86402ec81e6dffdf9d324b5e757db17247810565f98dc"},
{ 110000, "be2a474f6a2de7b855a7329256dc1056268e02d8d3844c6b9fc67195bfd82ccb"},
{ 115000, "622fbdfa3de5a5797a225b1aa11f7d6b8e23a16b20a5f63048a0e2a1d9681cc6"},
{ 120000, "f7ff98e74a49e4c1f377f3e74b758e5a666fd007ddaf8e28ff9524a38d0d3be1"},
{ 125000, "ee04293cc69b2eff64a289626aab4d2474ce40a79163ee0712f4b531b89c22da"},
{ 130000, "e2f555027a78675e7b174d55bf65f31cfdb51cd841cd8cf82bf8f9a15a577f1c"}
};
}
2 changes: 1 addition & 1 deletion src/config/CryptoNoteConfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ const size_t P2P_LOCAL_GRAY_PEERLIST_LIMIT = 5000;
// P2P Network Configuration Section - This defines our current P2P network version
// and the minimum version for communication between nodes
const uint8_t P2P_CURRENT_VERSION = 3;
const uint8_t P2P_MINIMUM_VERSION = 0;
const uint8_t P2P_MINIMUM_VERSION = 1;
// This defines the number of versions ahead we must see peers before we start displaying
// warning messages that we need to upgrade our software.
const uint8_t P2P_UPGRADE_WINDOW = 2;
Expand Down

0 comments on commit b8d59ed

Please sign in to comment.