-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Permissioned DEX #5404
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
base: develop
Are you sure you want to change the base?
Permissioned DEX #5404
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #5404 +/- ##
=========================================
+ Coverage 78.6% 78.8% +0.2%
=========================================
Files 816 817 +1
Lines 70505 70746 +241
Branches 8288 8238 -50
=========================================
+ Hits 55448 55752 +304
+ Misses 15057 14994 -63
🚀 New features to boost your workflow:
|
Please fix the clang-format and clang builds |
Would you mind adding the spec link to the PR? If the implementation differs from the spec, could you please clarify the differences? |
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.
LGTM
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.
👍 LGTM
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.
RPC changes look reasonable for Clio.
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.
There's some minor cosmetic issues, please take a look.
@@ -120,10 +124,16 @@ OrderBookDB::update(std::shared_ptr<ReadView const> const& ledger) | |||
book.in.account = sle->getFieldH160(sfTakerPaysIssuer); | |||
book.out.currency = sle->getFieldH160(sfTakerGetsCurrency); | |||
book.out.account = sle->getFieldH160(sfTakerGetsIssuer); | |||
book.domain = (*sle)[~sfDomainID]; |
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.
Might be better to do something like book.domain = sle->at(~sfDomainID);
to avoid this syntax
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 think the current syntax is fine and widely used across the codebase. Is there a reason why is one preferred over the other?
@@ -278,7 +326,8 @@ OrderBookDB::processTxn( | |||
{ | |||
auto listeners = getBookListeners( | |||
{data->getFieldAmount(sfTakerGets).issue(), | |||
data->getFieldAmount(sfTakerPays).issue()}); | |||
data->getFieldAmount(sfTakerPays).issue(), | |||
(*data)[~sfDomainID]}); |
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.
Same as line 127
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.
Yep, you have a bug because std::nullopt
is a default param.
src/libxrpl/protocol/Book.cpp:51
:
Book
reversed(Book const& book)
{
return Book(book.out, book.in);
}
Note: there might be other places as well, so it's better to be safe and don't have default param.
High Level Overview of Change
https://github.com/XRPLF/XRPL-Standards/pull/281/files#diff-35a11d4d87e9deea6056a8e974075ece34ffb081689d0afb8a85b6d9bcded756
Context of Change
Type of Change
.gitignore
, formatting, dropping support for older tooling)API Impact
libxrpl
change (any change that may affectlibxrpl
or dependents oflibxrpl
)