From 4da85cec241c24072364f0501b8674cc913bdd67 Mon Sep 17 00:00:00 2001 From: Fernando Diaz Toledano Date: Wed, 14 Feb 2024 12:57:30 +0100 Subject: [PATCH] CS0618 --- src/Neo/SmartContract/ApplicationEngine.OpCodePrices.cs | 6 +++--- tests/Neo.UnitTests/SmartContract/UT_OpCodePrices.cs | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/Neo/SmartContract/ApplicationEngine.OpCodePrices.cs b/src/Neo/SmartContract/ApplicationEngine.OpCodePrices.cs index bd4836bfdb..16a0a95944 100644 --- a/src/Neo/SmartContract/ApplicationEngine.OpCodePrices.cs +++ b/src/Neo/SmartContract/ApplicationEngine.OpCodePrices.cs @@ -20,7 +20,7 @@ partial class ApplicationEngine /// /// The prices of all the opcodes. /// - [Obsolete] + [Obsolete("You should use OpCodePriceTable")] public static readonly IReadOnlyDictionary OpCodePrices = new Dictionary { [OpCode.PUSHINT8] = 1 << 0, @@ -228,9 +228,9 @@ partial class ApplicationEngine /// static ApplicationEngine() { -#pragma warning disable CS0612 // Type or member is obsolete +#pragma warning disable CS0618 // Type or member is obsolete foreach (var entry in OpCodePrices) -#pragma warning restore CS0612 // Type or member is obsolete +#pragma warning restore CS0618 // Type or member is obsolete { OpCodePriceTable[(byte)entry.Key] = entry.Value; } diff --git a/tests/Neo.UnitTests/SmartContract/UT_OpCodePrices.cs b/tests/Neo.UnitTests/SmartContract/UT_OpCodePrices.cs index 1e4ef6069d..4f5ce0d180 100644 --- a/tests/Neo.UnitTests/SmartContract/UT_OpCodePrices.cs +++ b/tests/Neo.UnitTests/SmartContract/UT_OpCodePrices.cs @@ -24,9 +24,9 @@ public void AllOpcodePriceAreSet() { foreach (OpCode opcode in Enum.GetValues(typeof(OpCode))) { -#pragma warning disable CS0612 // Type or member is obsolete +#pragma warning disable CS0618 // Type or member is obsolete Assert.IsTrue(ApplicationEngine.OpCodePrices.ContainsKey(opcode), opcode.ToString(), $"{opcode} without price"); -#pragma warning restore CS0612 // Type or member is obsolete +#pragma warning restore CS0618 // Type or member is obsolete if (opcode == OpCode.RET || opcode == OpCode.SYSCALL ||