Skip to content

Commit

Permalink
coinbase tx: fix view tag, stagenet: update checkpoints
Browse files Browse the repository at this point in the history
  • Loading branch information
hayzamjs committed Aug 7, 2023
1 parent 8f7b77e commit e2179d9
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 18 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ CMakeFiles
cmake_install.cmake
install_manifest.txt
cmake-build-debug/
cmake-build-release/

### Linux ###
*~
Expand Down
9 changes: 3 additions & 6 deletions src/checkpoints/checkpoints.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -187,17 +187,14 @@ bool checkpoints::init_default_checkpoints(network_type nettype) {

if (nettype == STAGENET) {
ADD_CHECKPOINT2(
10, "4d8fe186fab1be886342954824efef811585442191cb3338e8c70ee7b29cad96",
10, "f8768008361a83cafc2c2e1263d5f56483a20a5c9537bd5fa6b5736931d5d75d",
"0x25");
ADD_CHECKPOINT2(
100, "331cc0c4e1a4acbc734e636452758af9577aac898edc8f38cf3d1b479cfe27ad",
100, "a8f7e69850570745364ce80a537409b134a909206f0b5b72a1549c98a3a1500f",
"0x4f224");
ADD_CHECKPOINT2(
150, "c0ff612f107eda2dd6139bb7914a0956db5c02a76552728a6eb8ba1ef0a197ff",
150, "6eea373d8bb85ef2365b5adb64f05ac01a7591e55b2e3c904076a56f2eab14df",
"0x9e566");
ADD_CHECKPOINT2(
200, "eff30fe3ea097a7ead70bd4a70c2fa0ed52a8a37c49c1679250feb7a0a5ad511",
"0x19e868");
return true;
}

Expand Down
17 changes: 5 additions & 12 deletions src/cryptonote_core/cryptonote_tx_utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -449,18 +449,11 @@ bool construct_miner_tx(size_t height, size_t median_weight,
uint64_t amount = out_amounts[no];
summary_amounts += out.amount = out_amounts[no];

if (hard_fork_version < 15) {
txout_to_key tk;
tk.key = out_eph_public_key;
out.target = tk;
} else {
txout_to_tagged_key tk;
crypto::view_tag view_tag;
crypto::derive_view_tag(derivation, no, view_tag);
tk.key = out_eph_public_key;
cryptonote::set_tx_out(amount, out_eph_public_key, true, view_tag, out);
out.target = tk;
}
crypto::view_tag view_tag;
crypto::derive_view_tag(derivation, no, view_tag);

bool need_vt = hard_fork_version >= 15;
cryptonote::set_tx_out(amount, out_eph_public_key, need_vt, view_tag, out);

tx.vout.push_back(out);

Expand Down

0 comments on commit e2179d9

Please sign in to comment.