From 3835cb723822efc3fe7118f4dcc9928301f48e29 Mon Sep 17 00:00:00 2001 From: Fabio Di Fabio Date: Mon, 16 May 2022 22:05:17 +0200 Subject: [PATCH] Fix: implement getMixHashOrPrevRandao to return the acutal value in the block header (#3839) Signed-off-by: Fabio Di Fabio --- CHANGELOG.md | 1 + .../besu/ethereum/core/ProcessableBlockHeader.java | 10 ++++++++++ 2 files changed, 11 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5ea5da4eac..200f9f23ab 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,7 @@ ### Bug Fixes - Stop the BlockPropagationManager when it receives the TTD reached event [#3809](https://github.com/hyperledger/besu/pull/3809) +- Correct getMixHashOrPrevRandao to return the value present in the block header [#3839](https://github.com/hyperledger/besu/pull/3839) ## 22.4.0 diff --git a/ethereum/core/src/main/java/org/hyperledger/besu/ethereum/core/ProcessableBlockHeader.java b/ethereum/core/src/main/java/org/hyperledger/besu/ethereum/core/ProcessableBlockHeader.java index de85ab52c0..4f2492c788 100644 --- a/ethereum/core/src/main/java/org/hyperledger/besu/ethereum/core/ProcessableBlockHeader.java +++ b/ethereum/core/src/main/java/org/hyperledger/besu/ethereum/core/ProcessableBlockHeader.java @@ -140,6 +140,16 @@ public class ProcessableBlockHeader implements BlockValues { return Optional.ofNullable(baseFee); } + /** + * Returns the mixHash before merge, and the prevRandao value after + * + * @return the mixHash before merge, and the prevRandao value after + */ + @Override + public Bytes32 getMixHashOrPrevRandao() { + return mixHashOrPrevRandao; + } + /** * Returns the prevRandao of the block. *