Skip to content

Commit

Permalink
Minor fixes: renaming, HF numbers corresponding to Graft project
Browse files Browse the repository at this point in the history
  • Loading branch information
LenyKholodov committed May 13, 2019
1 parent 3cd9e23 commit c5a2fe2
Show file tree
Hide file tree
Showing 10 changed files with 22 additions and 32 deletions.
2 changes: 1 addition & 1 deletion src/blockchain_utilities/blockchain_blackball.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1071,7 +1071,7 @@ int main(int argc, char* argv[])

if (command_line::get_arg(vm, command_line::arg_help))
{
std::cout << "Monero '" << GRAFT_RELEASE_NAME << "' (v" << GRAFT_VERSION_FULL << ")" << ENDL << ENDL;
std::cout << "Graft '" << GRAFT_RELEASE_NAME << "' (v" << GRAFT_VERSION_FULL << ")" << ENDL << ENDL;
std::cout << desc_options << std::endl;
return 1;
}
Expand Down
2 changes: 1 addition & 1 deletion src/blockchain_utilities/blockchain_usage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ int main(int argc, char* argv[])

if (command_line::get_arg(vm, command_line::arg_help))
{
std::cout << "Monero '" << GRAFT_RELEASE_NAME << "' (v" << GRAFT_VERSION_FULL << ")" << ENDL << ENDL;
std::cout << "Graft '" << GRAFT_RELEASE_NAME << "' (v" << GRAFT_VERSION_FULL << ")" << ENDL << ENDL;
std::cout << desc_options << std::endl;
return 1;
}
Expand Down
5 changes: 1 addition & 4 deletions src/checkpoints/checkpoints.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -236,10 +236,7 @@ namespace cryptonote
static const std::vector<std::string> testnet_dns_urls = {
};

static const std::vector<std::string> stagenet_dns_urls = { "stagenetpoints.moneropulse.se"
, "stagenetpoints.moneropulse.org"
, "stagenetpoints.moneropulse.net"
, "stagenetpoints.moneropulse.co"
static const std::vector<std::string> stagenet_dns_urls = {
};

if (!tools::dns_utils::load_txt_records_from_dns(records, nettype == TESTNET ? testnet_dns_urls : nettype == STAGENET ? stagenet_dns_urls : dns_urls))
Expand Down
1 change: 0 additions & 1 deletion src/cryptonote_config.h
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,6 @@
#define HF_VERSION_MONERO_13 14
#define HF_VERSION_DYNAMIC_FEE 4
#define HF_VERSION_MIN_MIXIN_4 6
#define HF_VERSION_MIN_MIXIN_6 7
#define HF_VERSION_MIN_MIXIN_10 HF_VERSION_MONERO_13
#define HF_VERSION_ENFORCE_RCT 6
#define HF_VERSION_PER_BYTE_FEE HF_VERSION_MONERO_13
Expand Down
2 changes: 1 addition & 1 deletion src/cryptonote_core/cryptonote_core.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1048,7 +1048,7 @@ namespace cryptonote
//-----------------------------------------------------------------------------------------------
size_t core::get_block_sync_size(uint64_t height) const
{
static const uint64_t quick_height = m_nettype == TESTNET ? 801219 : m_nettype == MAINNET ? 1220516 : 0;
static const uint64_t quick_height = m_nettype == TESTNET ? 801219 : 1220516;
if (block_sync_size > 0)
return block_sync_size;
if (height >= quick_height)
Expand Down
3 changes: 0 additions & 3 deletions src/cryptonote_core/stake_transaction_storage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,6 @@
#undef MONERO_DEFAULT_LOG_CATEGORY
#define MONERO_DEFAULT_LOG_CATEGORY "staketransaction.storage"

#undef MONERO_DEFAULT_LOG_CATEGORY
#define MONERO_DEFAULT_LOG_CATEGORY "staketransaction.storage"

using namespace cryptonote;

namespace
Expand Down
4 changes: 0 additions & 4 deletions src/p2p/net_node.inl
Original file line number Diff line number Diff line change
Expand Up @@ -489,10 +489,6 @@ namespace nodetool
}
else if (nettype == cryptonote::STAGENET)
{
// TODO: graft stagenet nodes
full_addrs.insert("34.204.170.120:38880");
full_addrs.insert("54.88.58.35:38880");
full_addrs.insert("34.228.64.99:38880");
}
else if (nettype == cryptonote::FAKECHAIN)
{
Expand Down
15 changes: 8 additions & 7 deletions src/simplewallet/simplewallet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,6 @@ typedef cryptonote::simple_wallet sw;

#define MIN_RING_SIZE 11 // Used to inform user about min ring size -- does not track actual protocol

//#define OUTPUT_EXPORT_FILE_MAGIC "Graft output export\003"

#define LOCK_IDLE_SCOPE() \
bool auto_refresh_enabled = m_auto_refresh_enabled.load(std::memory_order_relaxed); \
m_auto_refresh_enabled.store(false, std::memory_order_relaxed); \
Expand Down Expand Up @@ -1877,7 +1875,7 @@ bool simple_wallet::set_default_ring_size(const std::vector<std::string> &args/*
if (ring_size != 0 && ring_size != DEFAULT_MIX+1)
message_writer() << tr("WARNING: this is a non default ring size, which may harm your privacy. Default is recommended.");
else if (ring_size == DEFAULT_MIX)
message_writer() << tr("WARNING: from v8, ring size will be fixed and this setting will be ignored.");
message_writer() << tr("WARNING: from v14, ring size will be fixed and this setting will be ignored.");

const auto pwd_container = get_and_verify_password();
if (pwd_container)
Expand Down Expand Up @@ -2348,10 +2346,13 @@ simple_wallet::simple_wallet()
boost::bind(&simple_wallet::sweep_single, this, _1),
tr("sweep_single [<priority>] [<ring_size>] [outputs=<N>] <key_image> <address> [<payment_id>]"),
tr("Send a single output of the given key image to an address without change."));
//Disable donations for Graft
#if 0
m_cmd_binder.set_handler("donate",
boost::bind(&simple_wallet::donate, this, _1),
tr("donate [index=<N1>[,<N2>,...]] [<priority>] [<ring_size>] <amount> [<payment_id>]"),
tr("Donate <amount> to the development team (donate.getmonero.org)."));
#endif
m_cmd_binder.set_handler("sign_transfer",
boost::bind(&simple_wallet::sign_transfer, this, _1),
tr("sign_transfer [export_raw]"),
Expand Down Expand Up @@ -2429,7 +2430,7 @@ simple_wallet::simple_wallet()
"confirm-missing-payment-id <1|0>\n "
"ask-password <0|1|2 (or never|action|decrypt)>\n "
"unit <monero|millinero|micronero|nanonero|piconero>\n "
" Set the default monero (sub-)unit.\n "
" Set the default Graft (sub-)unit.\n "
"min-outputs-count [n]\n "
" Try to keep at least that many outputs of value at least min-outputs-value.\n "
"min-outputs-value [n]\n "
Expand All @@ -2445,12 +2446,12 @@ simple_wallet::simple_wallet()
"auto-low-priority <1|0>\n "
" Whether to automatically use the low priority fee level when it's safe to do so.\n "
"segregate-pre-fork-outputs <1|0>\n "
" Set this if you intend to spend outputs on both Monero AND a key reusing fork.\n "
" Set this if you intend to spend outputs on both Graft AND a key reusing fork.\n "
"key-reuse-mitigation2 <1|0>\n "
" Set this if you are not sure whether you will spend on a key reusing Monero fork later.\n"
" Set this if you are not sure whether you will spend on a key reusing Graft fork later.\n"
"subaddress-lookahead <major>:<minor>\n "
" Set the lookahead sizes for the subaddress hash table.\n "
" Set this if you are not sure whether you will spend on a key reusing Monero fork later.\n "
" Set this if you are not sure whether you will spend on a key reusing Graft fork later.\n "
"segregation-height <n>\n "
" Set to the height of a key reusing fork you want to use, 0 to use default."));
m_cmd_binder.set_handler("encrypted_seed",
Expand Down
12 changes: 6 additions & 6 deletions src/wallet/wallet2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -113,11 +113,11 @@ using namespace cryptonote;
#define SUBADDRESS_LOOKAHEAD_MAJOR 50
#define SUBADDRESS_LOOKAHEAD_MINOR 200

#define KEY_IMAGE_EXPORT_FILE_MAGIC "Monero key image export\002"
#define KEY_IMAGE_EXPORT_FILE_MAGIC "Graft key image export\002"

#define MULTISIG_EXPORT_FILE_MAGIC "Monero multisig export\001"
#define MULTISIG_EXPORT_FILE_MAGIC "Graft multisig export\001"

#define OUTPUT_EXPORT_FILE_MAGIC "Monero output export\003"
#define OUTPUT_EXPORT_FILE_MAGIC "Graft output export\003"

#define SEGREGATION_FORK_HEIGHT 99999999
#define TESTNET_SEGREGATION_FORK_HEIGHT 99999999
Expand All @@ -138,7 +138,7 @@ namespace
boost::filesystem::path dir = tools::get_default_data_dir();
// remove .bitmonero, replace with .shared-ringdb
dir = dir.remove_filename();
dir /= ".shared-ringdb";
dir /= ".graft";
return dir.string();
}

Expand Down Expand Up @@ -1318,8 +1318,8 @@ void wallet2::scan_output(const cryptonote::transaction &tx, const crypto::publi
if (!m_encrypt_keys_after_refresh && m_callback)
{
boost::optional<epee::wipeable_string> pwd = m_callback->on_get_password("output received");
THROW_WALLET_EXCEPTION_IF(!pwd, error::password_needed, tr("Password is needed to compute key image for incoming monero"));
THROW_WALLET_EXCEPTION_IF(!verify_password(*pwd), error::password_needed, tr("Invalid password: password is needed to compute key image for incoming monero"));
THROW_WALLET_EXCEPTION_IF(!pwd, error::password_needed, tr("Password is needed to compute key image for incoming graft"));
THROW_WALLET_EXCEPTION_IF(!verify_password(*pwd), error::password_needed, tr("Invalid password: password is needed to compute key image for incoming graft"));
decrypt_keys(*pwd);
m_encrypt_keys_after_refresh = *pwd;
}
Expand Down
8 changes: 4 additions & 4 deletions src/wallet/wallet_rpc_server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -634,7 +634,7 @@ namespace tools
}
if (addresses.empty())
{
er.message = std::string("No Monero address found at ") + url;
er.message = std::string("No Graft address found at ") + url;
return {};
}
return addresses[0];
Expand Down Expand Up @@ -1799,7 +1799,7 @@ namespace tools
}
if (addresses.empty())
{
er.message = std::string("No Monero address found at ") + url;
er.message = std::string("No Graft address found at ") + url;
return {};
}
return addresses[0];
Expand Down Expand Up @@ -2584,7 +2584,7 @@ namespace tools
}
if (addresses.empty())
{
er.message = std::string("No Monero address found at ") + url;
er.message = std::string("No Graft address found at ") + url;
return {};
}
return addresses[0];
Expand Down Expand Up @@ -3681,7 +3681,7 @@ int main(int argc, char** argv) {
std::tie(vm, should_terminate) = wallet_args::main(
argc, argv,
"graft-wallet-rpc [--wallet-file=<file>|--generate-from-json=<file>|--wallet-dir=<directory>] [--rpc-bind-port=<port>]",
tools::wallet_rpc_server::tr("This is the RPC monero wallet. It needs to connect to a monero\ndaemon to work correctly."),
tools::wallet_rpc_server::tr("This is the RPC graft wallet. It needs to connect to a graft\ndaemon to work correctly."),
desc_params,
po::positional_options_description(),
[](const std::string &s, bool emphasis){ epee::set_console_color(emphasis ? epee::console_color_white : epee::console_color_default, true); std::cout << s << std::endl; if (emphasis) epee::reset_console_color(); },
Expand Down

0 comments on commit c5a2fe2

Please sign in to comment.