From 782200e45de662d5eb33748c29f3e6206f59fc94 Mon Sep 17 00:00:00 2001 From: "lukasz.rozmej" Date: Wed, 13 Dec 2023 22:53:39 +0100 Subject: [PATCH] Revert "Revert "overload instead of override"" This reverts commit ab921f950d1c62de245a43522b9065aa411cebd4. --- .../Data/ExecutionPayload.cs | 4 ++-- .../Data/ExecutionPayloadV3.cs | 16 ++++++++++++---- 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/src/Nethermind/Nethermind.Merge.Plugin/Data/ExecutionPayload.cs b/src/Nethermind/Nethermind.Merge.Plugin/Data/ExecutionPayload.cs index cedac0264f8..81a3553220a 100644 --- a/src/Nethermind/Nethermind.Merge.Plugin/Data/ExecutionPayload.cs +++ b/src/Nethermind/Nethermind.Merge.Plugin/Data/ExecutionPayload.cs @@ -97,14 +97,14 @@ public byte[][] Transactions /// EIP-4844. /// [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] - public virtual ulong? BlobGasUsed { get; set; } + public ulong? BlobGasUsed { get; set; } /// /// Gets or sets as defined in /// EIP-4844. /// [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] - public virtual ulong? ExcessBlobGas { get; set; } + public ulong? ExcessBlobGas { get; set; } /// /// Gets or sets as defined in diff --git a/src/Nethermind/Nethermind.Merge.Plugin/Data/ExecutionPayloadV3.cs b/src/Nethermind/Nethermind.Merge.Plugin/Data/ExecutionPayloadV3.cs index ff236bab63d..e4f8f477e91 100644 --- a/src/Nethermind/Nethermind.Merge.Plugin/Data/ExecutionPayloadV3.cs +++ b/src/Nethermind/Nethermind.Merge.Plugin/Data/ExecutionPayloadV3.cs @@ -18,8 +18,8 @@ public class ExecutionPayloadV3 : ExecutionPayload public ExecutionPayloadV3(Block block) : base(block) { ParentBeaconBlockRoot = block.ParentBeaconBlockRoot; - BlobGasUsed = block.BlobGasUsed; - ExcessBlobGas = block.ExcessBlobGas; + base.BlobGasUsed = block.BlobGasUsed; + base.ExcessBlobGas = block.ExcessBlobGas; } public override bool TryGetBlock(out Block? block, UInt256? totalDifficulty = null) @@ -43,12 +43,20 @@ public override bool ValidateFork(ISpecProvider specProvider) => /// EIP-4844. /// [JsonRequired] - public override ulong? BlobGasUsed { get; set; } + public new ulong BlobGasUsed + { + get => base.BlobGasUsed ?? 0; + set => base.BlobGasUsed = value; + } /// /// Gets or sets as defined in /// EIP-4844. /// [JsonRequired] - public override ulong? ExcessBlobGas { get; set; } + public new ulong ExcessBlobGas + { + get => base.ExcessBlobGas ?? 0; + set => base.ExcessBlobGas = value; + } }