Skip to content

Commit

Permalink
[flexi dag inspector] Add parents field adapter the dag network
Browse files Browse the repository at this point in the history
  • Loading branch information
welbon committed Jun 11, 2024
1 parent b21d47d commit 5b27a67
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>org.starcoin</groupId>
<artifactId>sdk</artifactId>
<version>1.1.31</version>
<version>1.2.1</version>

<name>Starcoin Java SDK</name>
<description>Starcoin Java SDK</description>
Expand Down
15 changes: 15 additions & 0 deletions src/main/java/org/starcoin/bean/BlockHeader.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@
import com.alibaba.fastjson.annotation.JSONType;
import com.fasterxml.jackson.annotation.JsonProperty;

import java.util.Vector;

@JSONType(naming = PropertyNamingStrategy.SnakeCase)
public class BlockHeader extends Base {
long timestamp;
Expand Down Expand Up @@ -78,6 +80,10 @@ public class BlockHeader extends Base {
@JsonProperty("txn_accumulator_root")
private String txnAccumulatorRoot;

@JSONField(name = "parents_hash")
@JsonProperty("parents_hash")
private Vector<String> parentsHash;

public String getAuthor() {
return author;
}
Expand Down Expand Up @@ -206,6 +212,14 @@ public void setDifficultyHexStr(String difficultyHexStr) {
this.difficultyHexStr = difficultyHexStr;
}

public Vector<String> getParentsHash() {
return parentsHash;
}

public void setParentsHash(Vector<String> parentsHash) {
this.parentsHash = parentsHash;
}

@Override
public String toString() {
return "BlockHeader{" +
Expand All @@ -225,6 +239,7 @@ public String toString() {
", parentHash='" + parentHash + '\'' +
", stateRoot='" + stateRoot + '\'' +
", txnAccumulatorRoot='" + txnAccumulatorRoot + '\'' +
", parents_hash='" + parentsHash + '\'' +
'}';
}
}

0 comments on commit 5b27a67

Please sign in to comment.