Skip to content

Commit

Permalink
overload instead of override
Browse files Browse the repository at this point in the history
  • Loading branch information
LukaszRozmej committed Dec 13, 2023
1 parent 45fd6a6 commit 27c3686
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -97,14 +97,14 @@ public byte[][] Transactions
/// <see href="https://eips.ethereum.org/EIPS/eip-4844">EIP-4844</see>.
/// </summary>
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public virtual ulong? BlobGasUsed { get; set; }
public ulong? BlobGasUsed { get; set; }

/// <summary>
/// Gets or sets <see cref="Block.ExcessBlobGas"/> as defined in
/// <see href="https://eips.ethereum.org/EIPS/eip-4844">EIP-4844</see>.
/// </summary>
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public virtual ulong? ExcessBlobGas { get; set; }
public ulong? ExcessBlobGas { get; set; }

/// <summary>
/// Gets or sets <see cref="Block.ParentBeaconBlockRoot"/> as defined in
Expand Down
16 changes: 12 additions & 4 deletions src/Nethermind/Nethermind.Merge.Plugin/Data/ExecutionPayloadV3.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -43,12 +43,20 @@ public override bool ValidateFork(ISpecProvider specProvider) =>
/// <see href="https://eips.ethereum.org/EIPS/eip-4844">EIP-4844</see>.
/// </summary>
[JsonRequired]
public override ulong? BlobGasUsed { get; set; }
public new ulong BlobGasUsed
{
get => base.BlobGasUsed ?? 0;
set => base.BlobGasUsed = value;
}

/// <summary>
/// Gets or sets <see cref="Block.ExcessBlobGas"/> as defined in
/// <see href="https://eips.ethereum.org/EIPS/eip-4844">EIP-4844</see>.
/// </summary>
[JsonRequired]
public override ulong? ExcessBlobGas { get; set; }
public new ulong ExcessBlobGas
{
get => base.ExcessBlobGas ?? 0;
set => base.ExcessBlobGas = value;
}
}

0 comments on commit 27c3686

Please sign in to comment.