Skip to content
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

Merged
merged 5 commits into from Apr 30, 2019

Conversation

Projects
3 participants
@jmjatlanta
Copy link
Contributor

commented Apr 29, 2019

This includes the changes of PR #1729, along with fixes requested in that PR.

In short, this PR fixes #1713

  • get_htlc(id)
  • get_htlc_by_from(account, start, limit)
  • get_htlc_by_to(account, start, limit)
  • get_full_accounts includes htlc

@jmjatlanta jmjatlanta marked this pull request as ready for review Apr 29, 2019

@@ -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>();

This comment has been minimized.

Copy link
@jmjatlanta

jmjatlanta Apr 29, 2019

Author Contributor

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.

@jmjatlanta jmjatlanta added this to In development in Feature Release (3.1.0) via automation Apr 29, 2019

@jmjatlanta jmjatlanta added this to the 3.1.0 - Feature Release milestone Apr 29, 2019

@ryanRfox ryanRfox moved this from In development to In testing in Feature Release (3.1.0) Apr 30, 2019

@pmconrad pmconrad referenced this pull request Apr 30, 2019

Closed

add htlc api calls #1729

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 );

This comment has been minimized.

Copy link
@pmconrad

pmconrad Apr 30, 2019

Contributor

This should be bob.name, and the count shouldn't be 0.

// 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");

This comment has been minimized.

Copy link
@pmconrad

pmconrad Apr 30, 2019

Contributor

Actually she's transferring 3 not 2 (same in the other cases)

@jmjatlanta jmjatlanta moved this from In testing to Done in Feature Release (3.1.0) Apr 30, 2019

@jmjatlanta jmjatlanta merged commit c737ea5 into develop Apr 30, 2019

2 checks passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details

@jmjatlanta jmjatlanta deleted the jmj_1713 branch Apr 30, 2019

@jmjatlanta jmjatlanta referenced this pull request Apr 30, 2019

Open

HTLC database APIs #1713

5 of 23 tasks complete
@oxarbitrage

This comment has been minimized.

Copy link
Member

commented May 2, 2019

nice work @jmjatlanta

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.