From de812d9c9a75c3936785d112b55818131b423c09 Mon Sep 17 00:00:00 2001 From: MoneroOcean Date: Mon, 6 Oct 2025 19:55:22 -0700 Subject: [PATCH] Fixed SAL enums --- src/cryptonote_basic/cryptonote_basic.h | 14 +------- src/cryptonote_protocol/enums.h | 48 +++++++++++++++++++++++++ src/ringct/rctTypes.h | 2 ++ 3 files changed, 51 insertions(+), 13 deletions(-) create mode 100644 src/cryptonote_protocol/enums.h diff --git a/src/cryptonote_basic/cryptonote_basic.h b/src/cryptonote_basic/cryptonote_basic.h index edd74a4..0e676d4 100644 --- a/src/cryptonote_basic/cryptonote_basic.h +++ b/src/cryptonote_basic/cryptonote_basic.h @@ -26,6 +26,7 @@ #include "tx_extra.h" #include "ringct/rctTypes.h" #include "cryptonote_protocol/blobdatatype.h" +#include "cryptonote_protocol/enums.h" #include "offshore/pricing_record.h" #include "zephyr_oracle/pricing_record.h" #include "salvium_oracle/pricing_record.h" @@ -51,19 +52,6 @@ namespace cryptonote typedef std::vector ring_signature; - enum salvium_transaction_type - { - UNSET = 0, - MINER = 1, - PROTOCOL = 2, - TRANSFER = 3, - CONVERT = 4, - BURN = 5, - STAKE = 6, - RETURN = 7, - MAX = 7 - }; - /* outputs */ struct txout_to_script diff --git a/src/cryptonote_protocol/enums.h b/src/cryptonote_protocol/enums.h new file mode 100644 index 0000000..c297f3f --- /dev/null +++ b/src/cryptonote_protocol/enums.h @@ -0,0 +1,48 @@ +// Redistribution and use in source and binary forms, with or without modification, are +// permitted provided that the following conditions are met: +// +// 1. Redistributions of source code must retain the above copyright notice, this list of +// conditions and the following disclaimer. +// +// 2. Redistributions in binary form must reproduce the above copyright notice, this list +// of conditions and the following disclaimer in the documentation and/or other +// materials provided with the distribution. +// +// 3. Neither the name of the copyright holder nor the names of its contributors may be +// used to endorse or promote products derived from this software without specific +// prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY +// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL +// THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, +// STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF +// THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +#pragma once +#ifndef CRYPTONOTE_ENUMS_H +#define CRYPTONOTE_ENUMS_H + +#include + +namespace cryptonote +{ + enum salvium_transaction_type + { + UNSET = 0, + MINER = 1, + PROTOCOL = 2, + TRANSFER = 3, + CONVERT = 4, + BURN = 5, + STAKE = 6, + RETURN = 7, + AUDIT = 8, + MAX = 8 + }; +} + +#endif // CRYPTONOTE_ENUMS_H diff --git a/src/ringct/rctTypes.h b/src/ringct/rctTypes.h index 675c42e..c5b23b0 100644 --- a/src/ringct/rctTypes.h +++ b/src/ringct/rctTypes.h @@ -52,6 +52,8 @@ extern "C" { #include "serialization/vector.h" #include "serialization/binary_archive.h" +#include "cryptonote_protocol/enums.h" + //Define this flag when debugging to get additional info on the console #ifdef DBG