Skip to content

Commit

Permalink
fix javadoc regressions in main (hyperledger#4971)
Browse files Browse the repository at this point in the history
* fix javadoc regressions in main

Signed-off-by: garyschulte <garyschulte@gmail.com>
  • Loading branch information
garyschulte authored and eum602 committed Nov 3, 2023
1 parent af67f18 commit 0ae6655
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -1297,10 +1297,16 @@ public Optional<StorageEntry> getMaybeUpdatedStorage() {
return maybeUpdatedStorage;
}

/**
* Accessor for versionedHashes, if present.
*
* @return optional list of hashes
*/
public Optional<List<Hash>> getVersionedHashes() {
return versionedHashes;
}

/** Reset. */
public void reset() {
maybeUpdatedMemory = Optional.empty();
maybeUpdatedStorage = Optional.empty();
Expand Down Expand Up @@ -1335,7 +1341,12 @@ public static class Builder {
private Multimap<Address, Bytes32> accessListWarmStorage = HashMultimap.create();

private Optional<List<Hash>> versionedHashes;

/**
* Sets Type.
*
* @param type the type
* @return the builder
*/
public Builder type(final Type type) {
this.type = type;
return this;
Expand Down Expand Up @@ -1594,6 +1605,12 @@ public Builder accessListWarmStorage(final Multimap<Address, Bytes32> accessList
return this;
}

/**
* Sets versioned hashes list.
*
* @param versionedHashes the Optional list of versioned hashes
* @return the builder
*/
public Builder versionedHashes(final Optional<List<Hash>> versionedHashes) {
this.versionedHashes = versionedHashes;
return this;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,23 @@

import org.apache.tuweni.bytes.Bytes;

/**
* The DataHash operation. https://eips.ethereum.org/EIPS/eip-4844
*
* <p>Reads index from the top of the stack as big-endian uint256, and replaces it on the stack with
* tx.message.blob_versioned_hashes[index] if index &lt; len(tx.message.blob_versioned_hashes), and
* otherwise with a zeroed bytes32 value.
*/
public class DataHashOperation extends AbstractOperation {

/** DATAHASH opcode number */
public static final int OPCODE = 0x49;

/**
* Instantiates a new DataHash operation.
*
* @param gasCalculator the gas calculator
*/
public DataHashOperation(final GasCalculator gasCalculator) {
super(OPCODE, "DATAHASH", 1, 1, gasCalculator);
}
Expand Down

0 comments on commit 0ae6655

Please sign in to comment.