-
Notifications
You must be signed in to change notification settings - Fork 4
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
Add compile-time switch for Sequentia RPC definitions #1
Conversation
{ | ||
|
||
static std::vector<RPCArg> CreateTxDoc() | ||
{ |
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 don't get what that is and how that differs from the other ones. Good enough for now I suppose?
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.
But then make it a branch until it's somewhat cleaner?
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.
It's a helper function for generating RPC documentation specific to createrawtransaction
. I haven't changed it at all from the Elements source (yet).
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.
Oh, maybe you were asking about the entire module.
I don't get what that is and how that differs from the other ones. Good enough for now I suppose?
It's effectively a way to override static methods by importing namespace methods from a different module.
But then make it a branch until it's somewhat cleaner?
I don't think #ifdefs containing more than a few lines of code would be cleaner, and in this case it'd be a few dozen. And we're going to want to override both createrawtransaction
and CreateTxDoc
soon.
Closing since this will create extra work if we try to upstream to Elements, and the Elements team has already expressed interest in the No Coin feature (ElementsProject/elements#1302),. |
Uses a compile time flag
__SEQUENTIA__
for switching between Sequentia and Elements RPC definitions.Note: The definition of sequentia::createrawtransaction hasn't been updated for the No Fee feature yet. This is more a demonstration and proof-of-concept for how we can extend the protocol without interfering with the Elements codepath.