-
Notifications
You must be signed in to change notification settings - Fork 24
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
Chainstate special RPC types #1161
Conversation
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.
Good stuff
pub struct RpcSignedTransaction { | ||
id: Id<Transaction>, | ||
tx: SignedTransaction, |
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.
Should both transaction Id and the serialized hash (including witness) be included?
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 is just a start... we can add more later when we need them.
pub fn new(block: Block, block_index: BlockIndex) -> Self { | ||
Self { | ||
id: block.get_id(), | ||
height: block_index.block_height(), | ||
block, |
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.
Thereare some other fields in BlockIndex
that we may consider including, namely chain_trust
and status
.
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.
Agreed, but again, we can do that later. I just did this as a proof of concept so that people don't become too inventive to solve this problem :D
chainstate/src/rpc/types/block.rs
Outdated
@@ -0,0 +1,37 @@ | |||
// Copyright (c) 2022 RBB S.r.l |
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.
Come and join us in the future my man
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.
Nah... I like it here better. Now leave me alone 😄
These types are used to add more information to the output of json RPC instead of just serializing the raw data from that type.