Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[dag block] fixed the missing parents #59

Merged
merged 1 commit into from
Jun 21, 2024
Merged
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
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.2.2</version>
<version>1.2.3</version>

<name>Starcoin Java SDK</name>
<description>Starcoin Java SDK</description>
Expand Down
9 changes: 6 additions & 3 deletions src/main/java/org/starcoin/bean/BlockHeader.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,14 @@
import com.alibaba.fastjson.PropertyNamingStrategy;
import com.alibaba.fastjson.annotation.JSONField;
import com.alibaba.fastjson.annotation.JSONType;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonProperty;

import java.util.List;
import java.util.Vector;

@JSONType(naming = PropertyNamingStrategy.SnakeCase)
@JsonIgnoreProperties(ignoreUnknown = true)
public class BlockHeader extends Base {
long timestamp;

Expand Down Expand Up @@ -82,7 +85,7 @@ public class BlockHeader extends Base {

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

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

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

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

Expand Down
Loading