Skip to content

Commit

Permalink
style: formatting
Browse files Browse the repository at this point in the history
Signed-off-by: Mustafa Uzun <mustafa.uzun@limechain.tech>
  • Loading branch information
mustafauzunn committed Jan 22, 2025
1 parent feee18e commit 1acb251
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
import static com.swirlds.platform.system.status.PlatformStatus.REPLAYING_EVENTS;

import com.hedera.hapi.node.state.roster.Roster;
import com.hedera.pbj.runtime.io.buffer.Bytes;
import com.swirlds.common.context.PlatformContext;
import com.swirlds.common.platform.NodeId;
import com.swirlds.platform.Consensus;
Expand Down Expand Up @@ -112,10 +111,8 @@ public List<ConsensusRound> addEvent(@NonNull final PlatformEvent event) {
return List.of();
}

final List<Bytes> transactions = event.getGossipEvent().transactions();
final boolean isNewFormat = !transactions.isEmpty();
final List<ConsensusRound> consensusRounds = consensus.addEvent(linkedEvent);
eventAddedMetrics.eventAdded(linkedEvent, isNewFormat);
eventAddedMetrics.eventAdded(linkedEvent);

if (!consensusRounds.isEmpty()) {
// If multiple rounds reach consensus at the same moment there is no need to pass in
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ public AddedEventMetrics(final NodeId selfId, final Metrics metrics) {
*
* @param event the event that was added
*/
public void eventAdded(final EventImpl event, final boolean isNewFormat) {
public void eventAdded(final EventImpl event) {
if (Objects.equals(event.getCreatorId(), selfId)) {
eventsCreatedPerSecond.cycle();
if (!event.getBaseEvent().getOtherParents().isEmpty()) {
Expand Down Expand Up @@ -163,9 +163,9 @@ public void eventAdded(final EventImpl event, final boolean isNewFormat) {
final Iterator<Transaction> iterator = event.getBaseEvent().transactionIterator();
while (iterator.hasNext()) {
final Transaction transaction = iterator.next();
numAppTrans++;
appSize += transaction.getBytesSize();
avgBytesPerTransaction.update(transaction.getBytesSize());
numAppTrans++;
appSize += transaction.getBytesSize();
avgBytesPerTransaction.update(transaction.getBytesSize());
}
avgTransactionsPerEvent.update(numAppTrans);
bytesPerSecondTrans.update(appSize);
Expand Down

0 comments on commit 1acb251

Please # to comment.