mirror of
https://github.com/cryptosharks131/lndg.git
synced 2026-08-13 12:33:04 +02:00
16 lines
605 B
Python
16 lines
605 B
Python
from gui.lnd_deps import lightning_pb2 as ln
|
|
from gui.lnd_deps import lightning_pb2_grpc as lnrpc
|
|
from gui.lnd_deps.lnd_connect import lnd_connect
|
|
|
|
def main():
|
|
stub = lnrpc.LightningStub(lnd_connect())
|
|
try:
|
|
stub.DeleteAllPayments(ln.DeleteAllPaymentsRequest(failed_payments_only=False, failed_htlcs_only=True))
|
|
stub.DeleteAllPayments(ln.DeleteAllPaymentsRequest(failed_payments_only=True, failed_htlcs_only=False))
|
|
except Exception as e:
|
|
print('Exception occured: ', e)
|
|
finally:
|
|
print('Delete All Payments Completed')
|
|
|
|
if __name__ == '__main__':
|
|
main()
|