-
Notifications
You must be signed in to change notification settings - Fork 236
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
feat: add indexer related rpc #905
Conversation
@xxuejie is assigned as the chief reviewer |
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.
A more general comment: personally I feel like this module shouldn't belong to CKB core, but right now we don't have a good way to keep it out of core. Should we get the chance to refactor CKB with plugin support, we should move this out of core and only works as a CKB plugin.
util/jsonrpc-types/src/wallet.rs
Outdated
#[derive(Serialize, Deserialize)] | ||
pub struct CellTransaction { | ||
pub created_by: TransactionPoint, | ||
pub consumed_by: Option<TransactionPoint>, |
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.
I'm not sure if the name here makes sense, a transaction consumes cells, not transaction, and yet here we have a transaction that is consumed by many other transactions. CellTransaction
is also an interesting name 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.
open for discussion
@xxuejie most review issues have been resolved, others are open for discussion, please review again, thanks. |
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.
Hold as requested by @doitian.
7b4fd4a
to
e06ab0b
Compare
Conflicted |
How to handle schema migration? The main database stores the version into the database to check compatibility. |
Currently, there are no version checking in the indexer store, I would like to refactor version and corruption checking of rocksdb to an utility function in future PR. |
This PR added 5 indexer related rpc, most lines of code are unit / integration test and document, core logic is in indexer/src/store.rs