aboutsummaryrefslogtreecommitdiff
path: root/src/cryptonote_core
diff options
context:
space:
mode:
authorZachary Michaels <mikezackles@gmail.com>2014-09-04 22:14:36 -0400
committerRiccardo Spagni <ric@spagni.net>2014-09-15 15:53:10 +0200
commitfb4146fa343399229c754331ecc78fe0c759ec7c (patch)
tree18dbbb427c846d83590bcf4f959d759dd81b7e5e /src/cryptonote_core
parentAdd testnet constants (diff)
downloadmonero-fb4146fa343399229c754331ecc78fe0c759ec7c.tar.xz
Reorganize testnet constants
Diffstat (limited to 'src/cryptonote_core')
-rw-r--r--src/cryptonote_core/cryptonote_basic_impl.cpp6
-rw-r--r--src/cryptonote_core/cryptonote_format_utils.cpp5
2 files changed, 5 insertions, 6 deletions
diff --git a/src/cryptonote_core/cryptonote_basic_impl.cpp b/src/cryptonote_core/cryptonote_basic_impl.cpp
index 17e3063b4..398c63443 100644
--- a/src/cryptonote_core/cryptonote_basic_impl.cpp
+++ b/src/cryptonote_core/cryptonote_basic_impl.cpp
@@ -105,7 +105,7 @@ namespace cryptonote {
//-----------------------------------------------------------------------
std::string get_account_address_as_str(const account_public_address& adr)
{
- return tools::base58::encode_addr(CRYPTONOTE_PUBLIC_ADDRESS_BASE58_PREFIX, t_serializable_object_to_blob(adr));
+ return tools::base58::encode_addr(config::CRYPTONOTE_PUBLIC_ADDRESS_BASE58_PREFIX, t_serializable_object_to_blob(adr));
}
//-----------------------------------------------------------------------
bool is_coinbase(const transaction& tx)
@@ -131,9 +131,9 @@ namespace cryptonote {
return false;
}
- if (CRYPTONOTE_PUBLIC_ADDRESS_BASE58_PREFIX != prefix)
+ if (config::CRYPTONOTE_PUBLIC_ADDRESS_BASE58_PREFIX != prefix)
{
- LOG_PRINT_L1("Wrong address prefix: " << prefix << ", expected " << CRYPTONOTE_PUBLIC_ADDRESS_BASE58_PREFIX);
+ LOG_PRINT_L1("Wrong address prefix: " << prefix << ", expected " << config::CRYPTONOTE_PUBLIC_ADDRESS_BASE58_PREFIX);
return false;
}
diff --git a/src/cryptonote_core/cryptonote_format_utils.cpp b/src/cryptonote_core/cryptonote_format_utils.cpp
index 47cd0e159..f7cddeded 100644
--- a/src/cryptonote_core/cryptonote_format_utils.cpp
+++ b/src/cryptonote_core/cryptonote_format_utils.cpp
@@ -672,8 +672,7 @@ namespace cryptonote
blobdata txb = tx_to_blob(bl.miner_tx);
std::string hex_tx_represent = string_tools::buff_to_hex_nodelimer(txb);
- //hard code coinbase tx in genesis block, because "tru" generating tx use random, but genesis should be always the same
- std::string genesis_coinbase_tx_hex = "013c01ff0001ffffffffffff03029b2e4c0281c0b02e7c53291a94d1d0cbff8883f8024f5142ee494ffbbd08807121017767aafcde9be00dcfd098715ebcf7f410daebc582fda69d24a28e9d0bc890d1";
+ std::string genesis_coinbase_tx_hex = config::GENESIS_TX;
blobdata tx_bl;
string_tools::parse_hexstr_to_binbuff(genesis_coinbase_tx_hex, tx_bl);
@@ -682,7 +681,7 @@ namespace cryptonote
bl.major_version = CURRENT_BLOCK_MAJOR_VERSION;
bl.minor_version = CURRENT_BLOCK_MINOR_VERSION;
bl.timestamp = 0;
- bl.nonce = 10000;
+ bl.nonce = config::GENESIS_NONCE;
miner::find_nonce_for_given_block(bl, 1, 0);
return true;
}