Skip to content

Commit

Permalink
CS0618
Browse files Browse the repository at this point in the history
  • Loading branch information
shargon committed Feb 14, 2024
1 parent 1dcb9a7 commit 4da85ce
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions src/Neo/SmartContract/ApplicationEngine.OpCodePrices.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ partial class ApplicationEngine
/// <summary>
/// The prices of all the opcodes.
/// </summary>
[Obsolete]
[Obsolete("You should use OpCodePriceTable")]
public static readonly IReadOnlyDictionary<OpCode, long> OpCodePrices = new Dictionary<OpCode, long>
{
[OpCode.PUSHINT8] = 1 << 0,
Expand Down Expand Up @@ -228,9 +228,9 @@ partial class ApplicationEngine
/// </summary>
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;
}
Expand Down
4 changes: 2 additions & 2 deletions tests/Neo.UnitTests/SmartContract/UT_OpCodePrices.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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 ||
Expand Down

0 comments on commit 4da85ce

Please sign in to comment.