-
Notifications
You must be signed in to change notification settings - Fork 5
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
multi: add endpoints for best mainchain and sidechain hashes #42
Conversation
app/rpc_server.rs
Outdated
async fn get_best_sidechain_block_hash( | ||
&self, | ||
) -> RpcResult<Option<thunder::types::BlockHash>> { | ||
let Some(sidechain_hash) = |
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.
This could be
self.app.node.try_get_tip().map_err(custom_err)
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.
haha yes indeed, don't know how that ended up in there
rpc-api/lib.rs
Outdated
|
||
/// Get the best sidechain block hash known by Thunder | ||
#[open_api_method(output_schema( | ||
PartialSchema = "thunder_schema::BitcoinBlockHash" |
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.
This looks like the wrong schema - is it even necessary to specify the output schema here?
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.
Thx, updated the schema. I don't understand what's going on here at all to be honest.
0940260
to
0321686
Compare
0cfa05a
to
13df2e2
Compare
Currently the output when fetching sidechain hashes is not really on a readable format...