Compare commits

..

3 Commits

Author SHA1 Message Date
MoneroOcean 1afe313308 XHV fix 2023-01-09 15:52:03 +00:00
MoneroOcean 516160568f Haven 3.0 support 2022-12-27 05:44:02 +00:00
MoneroOcean 157948193d Haven 3.0 support 2022-12-27 05:43:46 +00:00
2 changed files with 10 additions and 12 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
{ {
"name": "cryptoforknote-util", "name": "cryptoforknote-util",
"version": "13.0.0", "version": "13.0.2",
"main": "cryptoforknote-util", "main": "cryptoforknote-util",
"author": { "author": {
"name": "LucasJones", "name": "LucasJones",
+9 -11
View File
@@ -258,7 +258,7 @@ namespace cryptonote
uint64_t amount_burnt; uint64_t amount_burnt;
uint64_t amount_minted; uint64_t amount_minted;
std::vector<uint64_t> output_unlock_times; std::vector<uint64_t> output_unlock_times;
size_t collateral_index; // index to the outputs vector that denotes the collateral output. std::vector<uint32_t> collateral_indices;
// //
// NOTE: Loki specific // NOTE: Loki specific
@@ -313,10 +313,15 @@ namespace cryptonote
if (version >= POU_TRANSACTION_VERSION && vout_xhv.size() != output_unlock_times.size()) return false; if (version >= POU_TRANSACTION_VERSION && vout_xhv.size() != output_unlock_times.size()) return false;
VARINT_FIELD(amount_burnt) VARINT_FIELD(amount_burnt)
VARINT_FIELD(amount_minted) VARINT_FIELD(amount_minted)
if (version >= COLLATERAL_TRANSACTION_VERSION) { if (version >= COLLATERAL_TRANSACTION_VERSION && amount_burnt) {
VARINT_FIELD(collateral_index) FIELD(collateral_indices)
if (collateral_index >= vout.size()) if (collateral_indices.size() != 2) {
return false; return false;
}
for (const auto vout_idx: collateral_indices) {
if (vout_idx >= vout.size())
return false;
}
} }
} }
END_SERIALIZE() END_SERIALIZE()
@@ -665,13 +670,6 @@ namespace cryptonote
{ {
crypto::public_key pub; crypto::public_key pub;
crypto::secret_key sec; crypto::secret_key sec;
static inline keypair generate()
{
keypair k;
generate_keys(k.pub, k.sec);
return k;
}
}; };
//--------------------------------------------------------------- //---------------------------------------------------------------