-
Notifications
You must be signed in to change notification settings - Fork 649
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
HTLC API Additions #1742
HTLC API Additions #1742
Conversation
@@ -340,6 +340,9 @@ void application_impl::set_api_limit() { | |||
if(_options->count("api-limit-get-key-references")){ | |||
_app_options.api_limit_get_key_references = _options->at("api-limit-get-key-references").as<uint64_t>(); | |||
} | |||
if(_options->count("api-limit-get-htlc-by")) { | |||
_app_options.api_limit_get_htlc_by = _options->at("api-limit-get-htlc-by").as<uint64_t>(); |
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 would have liked a more descriptive name for this, and have it cover both "to" and "from", but I could not think of one.
tests/tests/htlc_tests.cpp
Outdated
BOOST_CHECK_EQUAL( full[alice.name].htlcs.size(), 3 ); | ||
|
||
full = db_api.get_full_accounts({bob.name}, false); | ||
BOOST_CHECK_EQUAL( full[alice.name].htlcs.size(), 0 ); |
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 should be bob.name
, and the count shouldn't be 0
.
tests/tests/htlc_tests.cpp
Outdated
// alice puts a htlc contract to bob | ||
{ | ||
graphene::chain::htlc_create_operation create_operation; | ||
BOOST_TEST_MESSAGE("Alice (who has 100 coins, is transferring 2 coins to Bob"); |
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.
Actually she's transferring 3 not 2 (same in the other cases)
nice work @jmjatlanta |
This includes the changes of PR #1729, along with fixes requested in that PR.
In short, this PR fixes #1713