carrot_impl: add consensus rule for unique output pubkeys in tx
Required by Carrot to mitigate burning bugs, described in section 4.3 of the Carrot spec: https://github.com/jeffro256/carrot/blob/master/carrot.md#43-transaction-model Also remove 0-out check in `check_output_types()`, which I added in and technically constitutes a retroactive network split. Co-authored-by: j-berman <justinberman@protonmail.com>
This commit is contained in:
@@ -110,15 +110,6 @@ namespace cryptonote
|
||||
return amount * ACCEPT_THRESHOLD;
|
||||
}
|
||||
|
||||
uint64_t get_transaction_weight_limit(uint8_t version)
|
||||
{
|
||||
// from v2, limit a tx to 50% of the minimum block weight
|
||||
if (version >= 2)
|
||||
return get_min_block_weight(version) / 2 - CRYPTONOTE_COINBASE_BLOB_RESERVED_SIZE;
|
||||
else
|
||||
return get_min_block_weight(version) - CRYPTONOTE_COINBASE_BLOB_RESERVED_SIZE;
|
||||
}
|
||||
|
||||
// external lock must be held for the comparison+set to work properly
|
||||
void set_if_less(std::atomic<time_t>& next_check, const time_t candidate) noexcept
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user