Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,9 @@ void verifyUnsupportedTypes(final String caseName, final Key lValue, final Key r
.isInstanceOf(UnsupportedOperationException.class);
}

////////////////////////////////////////////////////////////////////////////////////////////////
// Parameterized test method sources //
////////////////////////////////////////////////////////////////////////////////////////////////
// ----------------------------------------------------------------------------------------------------
// Parameterized test method sources
// ----------------------------------------------------------------------------------------------------
public static Stream<Arguments> generateAllCrossTypeMatches() {
final Integer zero = Integer.valueOf(0);
final Integer one = Integer.valueOf(1);
Expand Down Expand Up @@ -508,9 +508,9 @@ private static void delegateIdCases(final List<Arguments> result) {
addDelegateId(result, minusOne, new IdVal("0.1.one", 0, 0, 1, -1), new IdVal("0.2.five", 4, 0, 2, -1));
}

////////////////////////////////////////////////////////////////////////////////////////////////
// Supporting methods and record types //
////////////////////////////////////////////////////////////////////////////////////////////////
// ----------------------------------------------------------------------------------------------------
// Supporting methods and record types
// ----------------------------------------------------------------------------------------------------
private static record IdVal(String name, int index, int realm, int shard, int num) {}

private static record NamedKeyList(String name, Key key) {}
Expand Down Expand Up @@ -540,9 +540,9 @@ private static Key modifyId(
else return Key.newBuilder().contractID(builder).build();
}

////////////////////////////////////////////////////////////////////////////////////////////////
// Static data fragments //
////////////////////////////////////////////////////////////////////////////////////////////////
// ----------------------------------------------------------------------------------------------------
// Static data fragments
// ----------------------------------------------------------------------------------------------------
// Test ECDSA SECP256 K1 key hex values
private static final Bytes[] ECDSA_BYTES = {
Bytes.fromHex("00badcadfaddad2bedfedbeef959feedbeadcafecadecedebeed4acedecada5ada"),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,6 @@ private enum State {
private final Signer signer;
/** The maximum size of a sidecar file in bytes. */
private final int maxSideCarSizeInBytes;
/** Whether to compress the record file and sidecar files. */
/** The node-specific path to the directory where record files are written */
private final Path nodeScopedRecordDir;
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@
import org.junit.jupiter.api.DynamicTest;
import org.junit.jupiter.api.Tag;

@Tag(SMART_CONTRACT)
/** - CONCURRENCY STATUS - . Can run concurrent without temporarySStoreRefundTest() */
@Tag(SMART_CONTRACT)
public class SStoreSuite {

private static final Logger log = LogManager.getLogger(SStoreSuite.class);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,14 +105,14 @@

// This test cases are direct copies of TokenCreateSpecs. The difference here is that
// we are wrapping the operations in an atomic batch to confirm that everything works as expected.
@HapiTestLifecycle
/**
* Validates the {@code TokenCreate} transaction, including its:
* <ul>
* <li>Auto-association behavior.</li>
* <li>Default values.</li>
* </ul>
*/
@HapiTestLifecycle
@Tag(TOKEN)
class AtomicTokenCreateSpecs {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ public StatsDemoMain() {
.build();
}

/////////////////////////////////////////////////////////////////////
// ----------------------------------------------------------------------------------------------------
/** the time of the last call to preEvent */
long lastEventTime = System.nanoTime();
/** number of events needed to be created (the non-integer leftover from last preEvent call */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public class PayloadDistribution {
private PAYLOAD_TYPE[] typeDistribution;
private int[] sizeDistribution;
private float[] ratioDistribution;
/** probability of payload distribution, sum of array should be 100 */
// probability of payload distribution, sum of array should be 100

// private PayloadDistribution(Builder builder) {
// this.typeDistribution = builder.typeDistribution;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,16 +90,16 @@ public static SUBMIT_GOAL fromOrdinal(int n) {
float c2cLatencySecond = 3;

/**
* track statistics to achive system goal
* track statistics to achieve system goal
*/
long accumulatedBytes = 0;

long accumulatedTrans = 0;
long accumulatedEvent = 0;
long accumulatedRound = 0;

long cycleStartMS = 0;
/** cycle start time in millisecond unit */
long cycleStartMS = 0;

/**
* pause submission after certain amount of transaction
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@
* A utility class to help build random states.
*/
public record StateBuilder(
/** Build a key for index 1..size. */
// Build a key for index 1..size.
Function<Long, Bytes> keyBuilder,
/** Build a value for key index 1..size. */
// Build a value for key index 1..size.
Function<Long, BenchmarkValue> valueBuilder) {

/** Return {@code true} with the given probability. */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -244,9 +244,9 @@ public boolean isSelfHashing() {
return true;
}

//////////////////////////////////////////////////////////////////////////////////////////////////
// ----------------------------------------------------------------------------------------------------
// the following implement Queue<E>
//////////////////////////////////////////////////////////////////////////////////////////////////
// ----------------------------------------------------------------------------------------------------

/**
* Inserts the specified element into this queue if it is possible to do so
Expand Down Expand Up @@ -392,9 +392,9 @@ public synchronized E peek() {
return head.element;
}

//////////////////////////////////////////////////////////////////////////////////////////////////
// ----------------------------------------------------------------------------------------------------
// the following implement FastCopyable
//////////////////////////////////////////////////////////////////////////////////////////////////
// ----------------------------------------------------------------------------------------------------

/** {@inheritDoc} */
@Override
Expand All @@ -411,9 +411,9 @@ public synchronized FCQueue<E> copy() {
return queue;
}

//////////////////////////////////////////////////////////////////////////////////////////////////
// ----------------------------------------------------------------------------------------------------
// the following implement AbstractMerkleNode
//////////////////////////////////////////////////////////////////////////////////////////////////
// ----------------------------------------------------------------------------------------------------

@Override
protected synchronized void destroyNode() {
Expand All @@ -423,9 +423,9 @@ protected synchronized void destroyNode() {
hash = NULL_HASH;
}

//////////////////////////////////////////////////////////////////////////////////////////////////
// ----------------------------------------------------------------------------------------------------
// the following implement Java.util.Collection
//////////////////////////////////////////////////////////////////////////////////////////////////
// ----------------------------------------------------------------------------------------------------

/**
* Returns the number of elements in this collection.
Expand Down Expand Up @@ -717,9 +717,9 @@ public synchronized void clear() {
hash = null;
}

//////////////////////////////////////////////////////////////////////////////////////////////////
// ----------------------------------------------------------------------------------------------------
// the following FastCopyable methods have default implementations, but are overridden here
//////////////////////////////////////////////////////////////////////////////////////////////////
// ----------------------------------------------------------------------------------------------------

@Override
public boolean equals(final Object o) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,9 +82,9 @@ public Hash getHash() {
} // sync
}

//////////////////////////////////////////////////////////////////////////////////////////////////
// ----------------------------------------------------------------------------------------------------
// the following implement Queue<E>
//////////////////////////////////////////////////////////////////////////////////////////////////
// ----------------------------------------------------------------------------------------------------

/**
* Inserts the specified element into this queue if it is possible to do so
Expand Down Expand Up @@ -280,9 +280,9 @@ public E remove() {
}
}

//////////////////////////////////////////////////////////////////////////////////////////////////
// ----------------------------------------------------------------------------------------------------
// the following implement FastCopyable
//////////////////////////////////////////////////////////////////////////////////////////////////
// ----------------------------------------------------------------------------------------------------

/** {@inheritDoc} */
@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -173,9 +173,9 @@ public void invalidateHash() {
}
}

//////////////////////////////////////////////////////////////////////////////////////////////////
// ----------------------------------------------------------------------------------------------------
// the following implement Queue<E>
//////////////////////////////////////////////////////////////////////////////////////////////////
// ----------------------------------------------------------------------------------------------------

/**
* Inserts the specified element into this queue if it is possible to do so
Expand Down Expand Up @@ -335,9 +335,9 @@ public E peek() {
}
}

//////////////////////////////////////////////////////////////////////////////////////////////////
// ----------------------------------------------------------------------------------------------------
// the following implement FastCopyable
//////////////////////////////////////////////////////////////////////////////////////////////////
// ----------------------------------------------------------------------------------------------------

/** {@inheritDoc} */
@Override
Expand All @@ -364,9 +364,9 @@ public SlowMockFCQueue<E> copy() {
}
}

//////////////////////////////////////////////////////////////////////////////////////////////////
// ----------------------------------------------------------------------------------------------------
// the following implement Java.util.Collection
//////////////////////////////////////////////////////////////////////////////////////////////////
// ----------------------------------------------------------------------------------------------------

/**
* Returns the number of elements in this collection.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -906,9 +906,9 @@ private static boolean notRelevantForConsensus(@NonNull final EventImpl e) {
return e.getRoundCreated() == ConsensusConstants.ROUND_NEGATIVE_INFINITY;
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// ----------------------------------------------------------------------------------------------------
// Functions from SWIRLDS-TR-2020-01, verified by Coq proof
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// ----------------------------------------------------------------------------------------------------

/**
* Checks if this event is a witness. The {@link EventImpl#isWitness()} is set based on this
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ public static int arrayCompare(@Nullable final Bytes a1, @Nullable final Bytes a
return 0;
}

/////////////////////////////////////////////////////////////
// ----------------------------------------------------------------------------------------------------
// read from DataInputStream and
// write to DataOutputStream

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1115,9 +1115,9 @@ private interface AddressBookCallback {
void apply(NodeId nodeId, Address address) throws KeyStoreException, KeyLoadingException;
}

/////////////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////// MIGRATION METHODS //////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////////////////////////
// ----------------------------------------------------------------------------------------------------
// MIGRATION METHODS
// ----------------------------------------------------------------------------------------------------

/**
* Performs any necessary migration steps to ensure the key storage is up-to-date.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -218,9 +218,9 @@ private AddressBook addressBook() {
return loadConfigFile(testDataDirectory.resolve("config.txt")).getAddressBook();
}

/////////////////////////////////////////////////////////////////////////////
//////////////////////// MIGRATION SPECIFIC UNIT TESTS //////////////////////
/////////////////////////////////////////////////////////////////////////////
// ----------------------------------------------------------------------------------------------------
// MIGRATION SPECIFIC UNIT TESTS
// ----------------------------------------------------------------------------------------------------

/**
* The Negative Type 2 tests are designed to test the case where the key store loader is able to scan the key
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@
import org.hiero.base.crypto.Hashable;
import org.hiero.consensus.model.event.PlatformEvent;

@SuppressWarnings("unused") // issue tracked #6998
/**
* Validator that checks if the consensus mechanism does not return events more than once, either as stale or consensus.
*/
@SuppressWarnings("unused") // issue tracked #6998
public final class OutputNoEventsLostValidation implements ConsensusOutputValidation {
private static final ConsensusConfig CONFIG =
new TestConfigBuilder().getOrCreateConfig().getConfigData(ConsensusConfig.class);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@
import org.hiero.base.io.streams.SerializableDataOutputStream;

/**
* A leaf in the merkle tree that stores a string as its value.
* @deprecated This class should be removed together with {@link MerkleStateRoot}.
*/
@Deprecated
/** A leaf in the merkle tree that stores a string as its value. */
public class StringLeaf extends PartialMerkleLeaf implements Labeled, MerkleLeaf {
private static final long CLASS_ID = 0x9C829FF3B2283L;
public static final int CLASS_VERSION = 1;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1410,8 +1410,6 @@ public void warm(@NonNull final Bytes key) {
records.findLeafRecord(key);
}

////////////////////////

/**
* Adds a new leaf with the given key and value. The precondition to calling this
* method is that the key DOES NOT have a corresponding leaf already either in the
Expand Down
Loading