Skip to content

Commit

Permalink
fix: payload identifier
Browse files Browse the repository at this point in the history
  • Loading branch information
thinkAfCod committed Jan 9, 2024
1 parent 2c08735 commit be3c0a4
Showing 1 changed file with 7 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -91,12 +91,13 @@ public static PayloadIdentifier forPayloadParams(
digest.update(Longs.toByteArray(timestamp));
digest.update(prevRandao.toArrayUnsafe());
digest.update(feeRecipient.toArrayUnsafe());
withdrawals.ifPresent(
withdrawalList -> {
final BytesValueRLPOutput out = new BytesValueRLPOutput();
out.writeList(withdrawalList, Withdrawal::writeTo);
digest.update(out.encoded().toArrayUnsafe());
});
final BytesValueRLPOutput out = new BytesValueRLPOutput();
if (withdrawals.isPresent()) {
out.writeList(withdrawals.get(), Withdrawal::writeTo);
} else {
out.writeEmptyList();
}
digest.update(out.encoded().toArrayUnsafe());
parentBeaconBlockRoot.ifPresent(
parentBeaconBlockRootBytes -> digest.update(parentBeaconBlockRootBytes.toArrayUnsafe()));
boolean noTxPoolFlag = noTxPool.orElse(false);
Expand Down

0 comments on commit be3c0a4

Please sign in to comment.