-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #107 from cryptape/rpc
feat: Add peersInfo and getVersion RPC request method
- Loading branch information
Showing
9 changed files
with
118 additions
and
67 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
19 changes: 19 additions & 0 deletions
19
core/src/main/java/com/cryptape/cita/protocol/core/methods/response/AppVersion.java
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,19 @@ | ||
package com.cryptape.cita.protocol.core.methods.response; | ||
|
||
import com.cryptape.cita.protocol.core.Response; | ||
|
||
/** | ||
* Created by duanyytop on 2019-04-09. | ||
* Copyright © 2018 Cryptape. All rights reserved. | ||
*/ | ||
public class AppVersion extends Response<AppVersion.Version> { | ||
|
||
public Version getVersion() { | ||
return getResult(); | ||
} | ||
|
||
public static class Version { | ||
public String softwareVersion; | ||
} | ||
|
||
} |
22 changes: 22 additions & 0 deletions
22
core/src/main/java/com/cryptape/cita/protocol/core/methods/response/NetPeersInfo.java
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,22 @@ | ||
package com.cryptape.cita.protocol.core.methods.response; | ||
|
||
import com.cryptape.cita.protocol.core.Response; | ||
|
||
import java.util.Map; | ||
|
||
/** | ||
* Created by duanyytop on 2019-04-09. | ||
* Copyright © 2018 Cryptape. All rights reserved. | ||
*/ | ||
public class NetPeersInfo extends Response<NetPeersInfo.PeersInfo> { | ||
|
||
public PeersInfo getPeersInfo() { | ||
return getResult(); | ||
} | ||
|
||
public static class PeersInfo { | ||
public long amount; | ||
public Map<String, String> peers; | ||
} | ||
|
||
} |
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