-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: grapebaba <281165273@qq.com>
- Loading branch information
Showing
9 changed files
with
292 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,97 @@ | ||
/* | ||
* Copyright 2022 281165273grape@gmail.com | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with | ||
* the License. You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, | ||
* software distributed under the License is distributed on | ||
* an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, | ||
* either express or implied. See the License for the | ||
* specific language governing permissions and limitations under the License. | ||
*/ | ||
|
||
package io.sui.models; | ||
|
||
|
||
import java.util.Objects; | ||
|
||
/** | ||
* The type Committee info. | ||
* | ||
* @author grapebaba | ||
* @since 2022.11 | ||
*/ | ||
public class CommitteeInfo { | ||
|
||
private String authorityName; | ||
|
||
private Long stakeUnit; | ||
|
||
/** | ||
* Gets authority name. | ||
* | ||
* @return the authority name | ||
*/ | ||
public String getAuthorityName() { | ||
return authorityName; | ||
} | ||
|
||
/** | ||
* Sets authority name. | ||
* | ||
* @param authorityName the authority name | ||
*/ | ||
public void setAuthorityName(String authorityName) { | ||
this.authorityName = authorityName; | ||
} | ||
|
||
/** | ||
* Gets stake unit. | ||
* | ||
* @return the stake unit | ||
*/ | ||
public Long getStakeUnit() { | ||
return stakeUnit; | ||
} | ||
|
||
/** | ||
* Sets stake unit. | ||
* | ||
* @param stakeUnit the stake unit | ||
*/ | ||
public void setStakeUnit(Long stakeUnit) { | ||
this.stakeUnit = stakeUnit; | ||
} | ||
|
||
@Override | ||
public boolean equals(Object o) { | ||
if (this == o) { | ||
return true; | ||
} | ||
if (!(o instanceof CommitteeInfo)) { | ||
return false; | ||
} | ||
CommitteeInfo that = (CommitteeInfo) o; | ||
return authorityName.equals(that.authorityName) && stakeUnit.equals(that.stakeUnit); | ||
} | ||
|
||
@Override | ||
public int hashCode() { | ||
return Objects.hash(authorityName, stakeUnit); | ||
} | ||
|
||
@Override | ||
public String toString() { | ||
return "CommitteeInfo{" | ||
+ "authorityName='" | ||
+ authorityName | ||
+ '\'' | ||
+ ", stakeUnit=" | ||
+ stakeUnit | ||
+ '}'; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,84 @@ | ||
/* | ||
* Copyright 2022 281165273grape@gmail.com | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with | ||
* the License. You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, | ||
* software distributed under the License is distributed on | ||
* an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, | ||
* either express or implied. See the License for the | ||
* specific language governing permissions and limitations under the License. | ||
*/ | ||
|
||
package io.sui.models; | ||
|
||
|
||
import java.util.List; | ||
import java.util.Objects; | ||
|
||
/** | ||
* The type Committee info response. | ||
* | ||
* @author grapebaba | ||
* @since 2022.11 | ||
*/ | ||
public class CommitteeInfoResponse { | ||
|
||
@SuppressWarnings("checkstyle:MemberName") | ||
private List<CommitteeInfo> committee_info; | ||
|
||
private Long epoch; | ||
|
||
public List<CommitteeInfo> getCommittee_info() { | ||
return committee_info; | ||
} | ||
|
||
@SuppressWarnings("checkstyle:ParameterName") | ||
public void setCommittee_info(List<CommitteeInfo> committee_info) { | ||
this.committee_info = committee_info; | ||
} | ||
|
||
/** | ||
* Gets epoch. | ||
* | ||
* @return the epoch | ||
*/ | ||
public Long getEpoch() { | ||
return epoch; | ||
} | ||
|
||
/** | ||
* Sets epoch. | ||
* | ||
* @param epoch the epoch | ||
*/ | ||
public void setEpoch(Long epoch) { | ||
this.epoch = epoch; | ||
} | ||
|
||
@Override | ||
public boolean equals(Object o) { | ||
if (this == o) { | ||
return true; | ||
} | ||
if (!(o instanceof CommitteeInfoResponse)) { | ||
return false; | ||
} | ||
CommitteeInfoResponse that = (CommitteeInfoResponse) o; | ||
return committee_info.equals(that.committee_info) && epoch.equals(that.epoch); | ||
} | ||
|
||
@Override | ||
public int hashCode() { | ||
return Objects.hash(committee_info, epoch); | ||
} | ||
|
||
@Override | ||
public String toString() { | ||
return "CommitteeInfoResponse{" + "committee_info=" + committee_info + ", epoch=" + epoch + '}'; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
{ | ||
"jsonrpc": "2.0", | ||
"result": { | ||
"epoch": 0, | ||
"committee_info": [ | ||
[ | ||
"jeDRw8vxm2a0n+aH0KOpZRUt+O96ydex7xuZ3UZU9Je1WhWtJu/j80cqeB6BouJOANhnrGCksJ0TmtvoQaPnsgX1uR1lWes984wLrSoSbqczUVSct8FmaM9UcHTQgMzV", | ||
100000000000000 | ||
], | ||
[ | ||
"jp2Cc9GOkbhF+kqgQ4ndXheLmVvVCfWmnDU1qqVimEZaHJaZvX23mbrIy0IBRrXqAn0YKDCas4WGTkjce9yWD4Ol7SvaYAK2Hd8JrF9+VlVhtx248qLxRWtN2BCT+AVn", | ||
100000000000000 | ||
], | ||
[ | ||
"rRATLWm9e1cG0cSGZNjOKaOcPG3Sqtw+JJnNYzFnmayzdnlejieFihS8ihTR0W1QEddxw0joB+2P8ZpRwKH7UNAWkeJXiEONTSq3VSQjKwjoH91/FPHoGIMmRf3WvC7Z", | ||
100000000000000 | ||
], | ||
[ | ||
"uGAzcF47LG7QB7H7XbHagmaywwgTLk7KkixYCKYagXLDk39uvLoULwJ//+3/l3nLGQcZVZ4iEjocmK8qzW6AnBcV6PbDPstSfrA2kv0UUCA71jBaKcHUqqime7G7PouY", | ||
100000000000000 | ||
] | ||
] | ||
}, | ||
"id": 1 | ||
} |