fix unit-tests

This commit is contained in:
akildemir
2025-03-31 10:49:39 +03:00
parent 0418bfee30
commit 0f97ec9ea7
35 changed files with 639 additions and 535 deletions
+8 -8
View File
@@ -113,9 +113,9 @@ using namespace cryptonote;
// used to target a given block weight (additional outputs may be added on top to build fee)
#define TX_WEIGHT_TARGET(bytes) (bytes*2/3)
#define UNSIGNED_TX_PREFIX "Monero unsigned tx set\005"
#define SIGNED_TX_PREFIX "Monero signed tx set\005"
#define MULTISIG_UNSIGNED_TX_PREFIX "Monero multisig unsigned tx set\001"
#define UNSIGNED_TX_PREFIX "Salvium unsigned tx set\005"
#define SIGNED_TX_PREFIX "Salvium signed tx set\005"
#define MULTISIG_UNSIGNED_TX_PREFIX "Salvium multisig unsigned tx set\001"
#define RECENT_OUTPUT_RATIO (0.5) // 50% of outputs are from the recent zone
#define RECENT_OUTPUT_DAYS (1.8) // last 1.8 day makes up the recent zone (taken from monerolink.pdf, Miller et al)
@@ -129,11 +129,11 @@ using namespace cryptonote;
#define SUBADDRESS_LOOKAHEAD_MAJOR 50
#define SUBADDRESS_LOOKAHEAD_MINOR 200
#define KEY_IMAGE_EXPORT_FILE_MAGIC "Monero key image export\003"
#define KEY_IMAGE_EXPORT_FILE_MAGIC "Salvium key image export\003"
#define MULTISIG_EXPORT_FILE_MAGIC "Monero multisig export\001"
#define MULTISIG_EXPORT_FILE_MAGIC "Salvium multisig export\001"
#define OUTPUT_EXPORT_FILE_MAGIC "Monero output export\004"
#define OUTPUT_EXPORT_FILE_MAGIC "Salvium output export\004"
#define SEGREGATION_FORK_HEIGHT 99999999
#define TESTNET_SEGREGATION_FORK_HEIGHT 99999999
@@ -15966,13 +15966,13 @@ std::string wallet2::make_uri(const std::string &address, const std::string &pay
//----------------------------------------------------------------------------------------------------
bool wallet2::parse_uri(const std::string &uri, std::string &address, std::string &payment_id, uint64_t &amount, std::string &tx_description, std::string &recipient_name, std::vector<std::string> &unknown_parameters, std::string &error)
{
if (uri.substr(0, 7) != "salvium:")
if (uri.substr(0, 8) != "salvium:")
{
error = std::string("URI has wrong scheme (expected \"salvium:\"): ") + uri;
return false;
}
std::string remainder = uri.substr(7);
std::string remainder = uri.substr(8);
const char *ptr = strchr(remainder.c_str(), '?');
address = ptr ? remainder.substr(0, ptr-remainder.c_str()) : remainder;