add rct to the protocol

It is not yet constrained to a fork, so don't use on the real network
or you'll be orphaned or rejected.
This commit is contained in:
moneromooo-monero 2016-06-15 23:37:13 +01:00
parent 211d1db762
commit dc4aad7eb5
No known key found for this signature in database
GPG key ID: 686F07454D6CEFC3
26 changed files with 1219 additions and 285 deletions

View file

@ -79,7 +79,6 @@ bool gen_v2_tx_validation_base::generate_with(std::vector<test_event_entry>& eve
}
// create a tx with the Nth outputs of miner's block reward
typedef tx_source_entry::output_entry tx_output_entry;
std::vector<tx_source_entry> sources;
for (size_t out_idx_idx = 0; out_idx[out_idx_idx] >= 0; ++out_idx_idx) {
sources.resize(sources.size()+1);
@ -88,13 +87,12 @@ bool gen_v2_tx_validation_base::generate_with(std::vector<test_event_entry>& eve
src.amount = blocks[0].miner_tx.vout[out_idx[out_idx_idx]].amount;
std::cout << "using " << print_money(src.amount) << " output at index " << out_idx[out_idx_idx] << std::endl;
for (int m = 0; m <= mixin; ++m) {
tx_output_entry oe;
int idx;
if (is_valid_decomposed_amount(src.amount))
oe.first = m+1; // one out of that size per miner tx, including genesis
idx = m+1; // one out of that size per miner tx, including genesis
else
oe.first = 0; // dusty, no other output of that size
oe.second = boost::get<txout_to_key>(blocks[m].miner_tx.vout[out_idx[out_idx_idx]].target).key;
src.outputs.push_back(oe);
idx = 0; // dusty, no other output of that size
src.push_output(idx, boost::get<txout_to_key>(blocks[m].miner_tx.vout[out_idx[out_idx_idx]].target).key, src.amount);
}
src.real_out_tx_key = cryptonote::get_tx_pub_key_from_extra(blocks[0].miner_tx);
src.real_output = 0;