-
Notifications
You must be signed in to change notification settings - Fork 422
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
feature: add getheader method. #502
feature: add getheader method. #502
Conversation
1acecb2
to
4777991
Compare
4777991
to
37bbf7e
Compare
boolean detail = false; | ||
if (parameters == null || parameters.length == 0) { | ||
// query current header | ||
System.out.println("Get current header !!!"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if no parameters, it should remind how to use the command and then return.
such as "GetBlockByIdOrNum needs 2 parameters like following: "
...
@@ -1083,4 +1083,23 @@ public Optional<MarketOrder> getMarketOrderById(byte[] order) { | |||
return Optional.ofNullable(orderPair); | |||
} | |||
|
|||
public Optional<BlockExtention> getBlock(String idOrNum, boolean detail) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use BlockExtention instead of BlockExtention
37bbf7e
to
5fc1237
Compare
idOrNum = parameters[0]; | ||
} | ||
} else { | ||
idOrNum = parameters[0]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we should check if the input blocknum is negative
No description provided.