You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tuweni.apache.org by to...@apache.org on 2020/02/10 22:29:29 UTC

[incubator-tuweni] branch master updated: Expose TxStats and add more javadoc

This is an automated email from the ASF dual-hosted git repository.

toulmean pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-tuweni.git


The following commit(s) were added to refs/heads/master by this push:
     new 0adb6c0  Expose TxStats and add more javadoc
0adb6c0 is described below

commit 0adb6c09c9a61866ff6a593e7a529ef7c1e20ac2
Author: Antoine Toulme <an...@lunar-ocean.com>
AuthorDate: Mon Feb 10 14:29:15 2020 -0800

    Expose TxStats and add more javadoc
---
 .../org/apache/tuweni/ethstats/BlockStats.java     | 23 ++++++++++++++++++++--
 .../java/org/apache/tuweni/ethstats/TxStats.java   |  7 +++++--
 2 files changed, 26 insertions(+), 4 deletions(-)

diff --git a/ethstats/src/main/java/org/apache/tuweni/ethstats/BlockStats.java b/ethstats/src/main/java/org/apache/tuweni/ethstats/BlockStats.java
index b9febd0..2a36e87 100644
--- a/ethstats/src/main/java/org/apache/tuweni/ethstats/BlockStats.java
+++ b/ethstats/src/main/java/org/apache/tuweni/ethstats/BlockStats.java
@@ -22,6 +22,9 @@ import java.util.List;
 
 import com.fasterxml.jackson.annotation.JsonGetter;
 
+/**
+ * Block statistics reported to ethnetstats.
+ */
 public final class BlockStats {
 
   private final UInt256 blockNumber;
@@ -38,8 +41,24 @@ public final class BlockStats {
   private final Hash stateRoot;
   private final List<BlockHeader> uncles;
 
-
-  BlockStats(
+  /**
+   * Default constructor.
+   * 
+   * @param blockNumber the block number
+   * @param hash the block hash
+   * @param parentHash the hash of the parent block, or null.
+   * @param timestamp the timestamp of the block
+   * @param miner the coinbase address of the block
+   * @param gasUsed the gas used by the block
+   * @param gasLimit the gas limit of the block
+   * @param difficulty the difficulty of the block
+   * @param totalDifficulty the total difficulty up to this block (including this block)
+   * @param transactions the list of transaction hashes associated with the block
+   * @param transactionsRoot the hash root of transactions
+   * @param stateRoot the hash root of the state
+   * @param uncles the block ommers associated with this block
+   */
+  public BlockStats(
       UInt256 blockNumber,
       Hash hash,
       Hash parentHash,
diff --git a/ethstats/src/main/java/org/apache/tuweni/ethstats/TxStats.java b/ethstats/src/main/java/org/apache/tuweni/ethstats/TxStats.java
index a2ddf6e..5007969 100644
--- a/ethstats/src/main/java/org/apache/tuweni/ethstats/TxStats.java
+++ b/ethstats/src/main/java/org/apache/tuweni/ethstats/TxStats.java
@@ -16,11 +16,14 @@ import org.apache.tuweni.crypto.Hash;
 
 import com.fasterxml.jackson.annotation.JsonGetter;
 
-final class TxStats {
+/**
+ * Stats reported to ethnetstats representing the hash of a transaction.
+ */
+public final class TxStats {
 
   private final Hash hash;
 
-  TxStats(Hash hash) {
+  public TxStats(Hash hash) {
     this.hash = hash;
   }
 


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@tuweni.apache.org
For additional commands, e-mail: commits-help@tuweni.apache.org