Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@motorina0
Copy link
Collaborator

@motorina0 motorina0 commented Mar 24, 2024

Add a new command that checks:

  • payments settled in the LNbits DB in the last d days (default 3 days)
  • on the above payments check the ones still pending on the funding source
  • list invalid the payments and the wallets

The command (in this version) does not alter payments or wallets, it simply lists them.

Example:

% lnbits-cli db check-payments 
efceca8caf664ca4a97a69b0b1d97c495c2ed9837cb39bb69101ecccc7af13ba 341d16d1e17847d48948b3d0ea230e58 1024.0     UPDATED SITETITLE
dea48986bdbbf2725452ff4752f573490b20f73b7ca35b2caa6238504b875e2a 9a795179846f400388d2b4bd488430e5 1006.0     66666
7a14e26ee2f85ac27050732bd5a5f6c6b841acb5d76a703d0e82d6b1f906fe83 9a795179846f400388d2b4bd488430e5 1005.0     LNbits XXX
62d97c5c3911de69e4b2654a3b563065ee55d06289035d34631624c1f662f72a 9a795179846f400388d2b4bd488430e5 1004.0     LNbits XXX
381c79307342ecae212939d4d26b4251a266a27bbc0a6b429382fc29b028b65a ef0099f0a2aa439eb9d45d8b48a37da6 1004.0     UPDATED SITETITLE
1edefff322c81f4906ef4f6a460f009ed797b678b25edc2447632252c4356a5e ef0099f0a2aa439eb9d45d8b48a37da6 1003.0     UPDATED SITETITLE
8b8ed39ae70384a192700ab02bd84c4c1ea119cc305428184e34d5e96d0c231a ef0099f0a2aa439eb9d45d8b48a37da6 100002.0   UPDATED SITETITLE
c9ab8904d488748c3c30cdc2b780f82e38ad46dc63f8f9049fdc5c75d71a84a5 ef0099f0a2aa439eb9d45d8b48a37da6 100001.0   UPDATED SITETITLE
7d6fc1f8f022940288a1f1aba2ee28f0b02b2232870f3c0fcd92df43472f7605 c671f359b557467182a9f76d871af599 123.0      UPDATED SITETITLE
60c7bc3a366c7b447158f874c3bec63c3bce9ad1c7aef47f1d94b15ef2a65b0a 2f424c68cafe4181a43b56a9699ee9f6 123.0      UPDATED SITETITLE
1023aa5d44d65702dfee37e2f9cf62b0527b709a5f327c0e98b6a1ee3f78b04a 9a795179846f400388d2b4bd488430e5 1234.0     LNbits XXX
269528aec793c9cd0123fe20e202ae1a572ca66c4c0712e8ec5816721c936789 9a795179846f400388d2b4bd488430e5 12.0       LNbits XXX
83a7d4a667a2f0e8e80ba1e803f66886d3dd533b7d0a3f145f886b55b2d31e8f 0006661e6a2a464aa5f7d1e110e3e836 12.0       UPDATED SITETITLE

Invalid Wallets: 6
341d16d1e17847d48948b3d0ea230e58 1 1024.0    
9a795179846f400388d2b4bd488430e5 5 4261.0    
ef0099f0a2aa439eb9d45d8b48a37da6 4 202010.0  
c671f359b557467182a9f76d871af599 1 123.0     
2f424c68cafe4181a43b56a9699ee9f6 1 123.0     
0006661e6a2a464aa5f7d1e110e3e836 1 12.0 

@codecov
Copy link

codecov bot commented Mar 24, 2024

Codecov Report

Attention: Patch coverage is 25.71429% with 26 lines in your changes are missing coverage. Please review.

Project coverage is 58.37%. Comparing base (7783f34) to head (8f98e91).

Files Patch % Lines
lnbits/commands.py 25.71% 26 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##              dev    #2353      +/-   ##
==========================================
- Coverage   58.51%   58.37%   -0.14%     
==========================================
  Files          61       61              
  Lines        9268     9303      +35     
==========================================
+ Hits         5423     5431       +8     
- Misses       3845     3872      +27     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@motorina0
Copy link
Collaborator Author

Merging without approval as this PR only adds a command and does not touch the server logic.

@motorina0 motorina0 merged commit 7e3c511 into dev Mar 24, 2024
@motorina0 motorina0 deleted the check_payments_command branch March 24, 2024 17:11
@motorina0 motorina0 added this to the 0.12.5 milestone Mar 24, 2024
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.

1 participant