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

High level payments overview method #1225

Merged
merged 3 commits into from
Dec 2, 2019
Merged

High level payments overview method #1225

merged 3 commits into from
Dec 2, 2019

Conversation

dpad85
Copy link
Member

@dpad85 dpad85 commented Nov 28, 2019

This PR add a method to get a high level/high performance overview of the payments from the payment database.

The PaymentDb interface is impacted to add two objects: PlainIncomingPayment and PlainOutgoingPayment. These objects only contains the most basic data about the payments.

Notably, the payment request attribute in these object is the raw serialized value stored in the DB which helps with performances on Android. Two methods have been added to the PaymentRequest object to allow for the fast reading of a serialized payment request's description and expiry.

This PR supercedes #1169

Copy link
Member

@t-bast t-bast left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@codecov-io
Copy link

codecov-io commented Nov 29, 2019

Codecov Report

Merging #1225 into master will increase coverage by 0.56%.
The diff coverage is 92.1%.

@@            Coverage Diff             @@
##           master    #1225      +/-   ##
==========================================
+ Coverage   76.39%   76.95%   +0.56%     
==========================================
  Files         140      140              
  Lines        9550     9887     +337     
  Branches      390      389       -1     
==========================================
+ Hits         7296     7609     +313     
- Misses       2254     2278      +24
Impacted Files Coverage Δ
...src/main/scala/fr/acinq/eclair/db/PaymentsDb.scala 70% <ø> (ø) ⬆️
...a/fr/acinq/eclair/db/sqlite/SqlitePaymentsDb.scala 98.5% <100%> (+0.24%) ⬆️
.../scala/fr/acinq/eclair/db/sqlite/SqliteUtils.scala 94.73% <100%> (+0.61%) ⬆️
...scala/fr/acinq/eclair/payment/PaymentRequest.scala 91.92% <75%> (-1.2%) ⬇️
...r/acinq/eclair/payment/send/PaymentInitiator.scala 97.72% <0%> (-2.28%) ⬇️
...ir-core/src/main/scala/fr/acinq/eclair/Setup.scala 71.89% <0%> (-1.37%) ⬇️
...src/main/scala/fr/acinq/eclair/router/Router.scala 91.97% <0%> (-0.72%) ⬇️
.../scala/fr/acinq/eclair/payment/relay/Relayer.scala 83.62% <0%> (-0.17%) ⬇️
.../fr/acinq/eclair/payment/relay/CommandBuffer.scala 100% <0%> (ø) ⬆️
...nq/eclair/blockchain/electrum/ElectrumWallet.scala 81% <0%> (+0.25%) ⬆️
... and 8 more

@dpad85 dpad85 merged commit fd5d9ae into master Dec 2, 2019
@dpad85 dpad85 deleted the high-level-payments branch December 2, 2019 10:35
t-bast added a commit that referenced this pull request Jul 26, 2022
We introduced a way to get a "light" payments view in #1225.
This was a performance improvement for mobile wallets embedding eclair.

Mobile wallets should now use lightning-kmp instead of eclair, so we can
get rid of that unused code.
t-bast added a commit that referenced this pull request Jul 26, 2022
We introduced a way to get a "light" payments view in #1225.
This was a performance improvement for mobile wallets embedding eclair.

Mobile wallets should now use lightning-kmp instead of eclair, so we can
get rid of that unused code.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants