Skip to content

Commit 8f8dcdf

Browse files
committed
Add term weight
1 parent cd6fe37 commit 8f8dcdf

File tree

6 files changed

+312
-46
lines changed

6 files changed

+312
-46
lines changed

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ ext {
3535
// integrationTest.mustRunAfter test
3636
allprojects {
3737
group = 'org.fisco-bcos.java-sdk'
38-
version = '3.8.0'
38+
version = '3.9.0-SNAPSHOT'
3939

4040
apply plugin: 'maven-publish'
4141
apply plugin: 'idea'

src/main/java/org/fisco/bcos/sdk/v3/client/protocol/response/ConsensusStatus.java

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,9 @@ public static class ConsensusNodeInfo {
4646
@JsonProperty("weight")
4747
private Integer weight;
4848

49+
@JsonProperty("termWeight")
50+
private Integer termWeight;
51+
4952
@JsonProperty("index")
5053
private Integer index;
5154

@@ -65,6 +68,14 @@ public void setWeight(Integer weight) {
6568
this.weight = weight;
6669
}
6770

71+
public Integer getTermWeight() {
72+
return termWeight;
73+
}
74+
75+
public void setTermWeight(Integer termWeight) {
76+
this.termWeight = termWeight;
77+
}
78+
6879
public Integer getIndex() {
6980
return index;
7081
}
@@ -82,6 +93,9 @@ public String toString() {
8293
+ ", weight='"
8394
+ weight
8495
+ '\''
96+
+ ", termWeight='"
97+
+ termWeight
98+
+ '\''
8599
+ ", index='"
86100
+ index
87101
+ '\''

src/main/java/org/fisco/bcos/sdk/v3/client/protocol/response/SealerList.java

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,21 @@ public class SealerList extends JsonRpcResponse<List<SealerList.Sealer>> {
2424
public static class Sealer {
2525
private String nodeID;
2626
private int weight;
27+
private int termWeight;
2728

2829
@Override
2930
public String toString() {
30-
return "Sealer{" + "nodeID='" + nodeID + '\'' + ", weight=" + weight + '}';
31+
return "Sealer{"
32+
+ "nodeID='"
33+
+ nodeID
34+
+ '\''
35+
+ ", weight="
36+
+ weight
37+
+ "'"
38+
+ "termWeight='"
39+
+ termWeight
40+
+ "'"
41+
+ '}';
3142
}
3243

3344
public String getNodeID() {
@@ -46,6 +57,14 @@ public void setWeight(int weight) {
4657
this.weight = weight;
4758
}
4859

60+
public int getTermWeight() {
61+
return termWeight;
62+
}
63+
64+
public void setTermWeight(int termWeight) {
65+
this.termWeight = termWeight;
66+
}
67+
4968
@Override
5069
public int hashCode() {
5170
return this.getNodeID().hashCode() + this.getWeight();

0 commit comments

Comments
 (0)