so this commit contains a new GENESIS TX with the revised TX format - no pricing_record_height etc. Lots of reworking of tests because of changes to function prototypes, etc
This commit is contained in:
@@ -344,8 +344,14 @@ TEST(ringct, range_proofs)
|
||||
catch(...) { ok = true; }
|
||||
ASSERT_TRUE(ok);
|
||||
|
||||
cryptonote::transaction_type tx_type = cryptonote::transaction_type::TRANSFER;
|
||||
std::string in_asset_type = "FULM";
|
||||
std::vector<std::string> destination_asset_types;
|
||||
for (size_t i = 0; i < destinations.size(); ++i)
|
||||
destination_asset_types.push_back("FULM");
|
||||
|
||||
//compute rct data with mixin 3
|
||||
rctSig s = genRctSimple(rct::zero(), sc, pc, destinations, inamounts, amounts, amount_keys, 0, 3, rct_config, hw::get_device("default"));
|
||||
rctSig s = genRctSimple(rct::zero(), sc, pc, destinations, tx_type, in_asset_type, destination_asset_types, inamounts, amounts, amount_keys, 0, 3, rct_config, hw::get_device("default"));
|
||||
|
||||
//verify rct data
|
||||
ASSERT_TRUE(verRctSimple(s));
|
||||
@@ -362,7 +368,7 @@ TEST(ringct, range_proofs)
|
||||
|
||||
|
||||
//compute rct data with mixin 3
|
||||
s = genRctSimple(rct::zero(), sc, pc, destinations, inamounts, amounts, amount_keys, 0, 3, rct_config, hw::get_device("default"));
|
||||
s = genRctSimple(rct::zero(), sc, pc, destinations, tx_type, in_asset_type, destination_asset_types, inamounts, amounts, amount_keys, 0, 3, rct_config, hw::get_device("default"));
|
||||
|
||||
//verify rct data
|
||||
ASSERT_FALSE(verRctSimple(s));
|
||||
@@ -409,8 +415,14 @@ TEST(ringct, range_proofs_with_fee)
|
||||
|
||||
const rct::RCTConfig rct_config { RangeProofBorromean, 0 };
|
||||
|
||||
cryptonote::transaction_type tx_type = cryptonote::transaction_type::TRANSFER;
|
||||
std::string in_asset_type = "FULM";
|
||||
std::vector<std::string> destination_asset_types;
|
||||
for (size_t i = 0; i < destinations.size(); ++i)
|
||||
destination_asset_types.push_back("FULM");
|
||||
|
||||
//compute rct data with mixin 3
|
||||
rctSig s = genRctSimple(rct::zero(), sc, pc, destinations, inamounts, amounts, amount_keys, 1, 3, rct_config, hw::get_device("default"));
|
||||
rctSig s = genRctSimple(rct::zero(), sc, pc, destinations, tx_type, in_asset_type, destination_asset_types, inamounts, amounts, amount_keys, 1, 3, rct_config, hw::get_device("default"));
|
||||
|
||||
//verify rct data
|
||||
ASSERT_TRUE(verRctSimple(s));
|
||||
@@ -427,7 +439,7 @@ TEST(ringct, range_proofs_with_fee)
|
||||
|
||||
|
||||
//compute rct data with mixin 3
|
||||
s = genRctSimple(rct::zero(), sc, pc, destinations, inamounts, amounts, amount_keys, 500, 3, rct_config, hw::get_device("default"));
|
||||
s = genRctSimple(rct::zero(), sc, pc, destinations, tx_type, in_asset_type, destination_asset_types, inamounts, amounts, amount_keys, 500, 3, rct_config, hw::get_device("default"));
|
||||
|
||||
//verify rct data
|
||||
ASSERT_FALSE(verRctSimple(s));
|
||||
@@ -486,7 +498,13 @@ TEST(ringct, simple)
|
||||
xmr_amount txnfee = 1;
|
||||
|
||||
const rct::RCTConfig rct_config { RangeProofBorromean, 0 };
|
||||
rctSig s = genRctSimple(message, sc, pc, destinations,inamounts, outamounts, amount_keys, txnfee, 2, rct_config, hw::get_device("default"));
|
||||
cryptonote::transaction_type tx_type = cryptonote::transaction_type::TRANSFER;
|
||||
std::string in_asset_type = "FULM";
|
||||
std::vector<std::string> destination_asset_types;
|
||||
for (size_t i = 0; i < destinations.size(); ++i)
|
||||
destination_asset_types.push_back("FULM");
|
||||
|
||||
rctSig s = genRctSimple(message, sc, pc, destinations, tx_type, in_asset_type, destination_asset_types, inamounts, outamounts, amount_keys, txnfee, 2, rct_config, hw::get_device("default"));
|
||||
|
||||
//verify ring ct signature
|
||||
ASSERT_TRUE(verRctSimple(s));
|
||||
@@ -548,7 +566,13 @@ static rct::rctSig make_sample_simple_rct_sig(int n_inputs, const uint64_t input
|
||||
}
|
||||
|
||||
const rct::RCTConfig rct_config { RangeProofBorromean, 0 };
|
||||
return genRctSimple(rct::zero(), sc, pc, destinations, inamounts, outamounts, amount_keys, fee, 3, rct_config, hw::get_device("default"));
|
||||
cryptonote::transaction_type tx_type = cryptonote::transaction_type::TRANSFER;
|
||||
std::string in_asset_type = "FULM";
|
||||
std::vector<std::string> destination_asset_types;
|
||||
for (size_t i = 0; i < destinations.size(); ++i)
|
||||
destination_asset_types.push_back("FULM");
|
||||
|
||||
return genRctSimple(rct::zero(), sc, pc, destinations, tx_type, in_asset_type, destination_asset_types, inamounts, outamounts, amount_keys, fee, 3, rct_config, hw::get_device("default"));
|
||||
}
|
||||
|
||||
static bool range_proof_test(bool expected_valid,
|
||||
|
||||
Reference in New Issue
Block a user