mirror of
https://github.com/RoboSats/robosats.git
synced 2025-07-25 22:43:26 +00:00
Silence initialization of nick generator
This commit is contained in:
@ -59,12 +59,16 @@ class Command(BaseCommand):
|
|||||||
request = LNNode.invoicesrpc.LookupInvoiceMsg(payment_hash=bytes.fromhex(hold_lnpayment.payment_hash))
|
request = LNNode.invoicesrpc.LookupInvoiceMsg(payment_hash=bytes.fromhex(hold_lnpayment.payment_hash))
|
||||||
response = stub.LookupInvoiceV2(request, metadata=[('macaroon', MACAROON.hex())])
|
response = stub.LookupInvoiceV2(request, metadata=[('macaroon', MACAROON.hex())])
|
||||||
hold_lnpayment.status = lnd_state_to_lnpayment_status[response.state]
|
hold_lnpayment.status = lnd_state_to_lnpayment_status[response.state]
|
||||||
|
|
||||||
# If it fails at finding the invoice it has been canceled.
|
|
||||||
# On RoboSats DB we make a distinction between cancelled and returned (LND does not)
|
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
|
# If it fails at finding the invoice it has been canceled.
|
||||||
|
# On RoboSats DB we make a distinction between cancelled and returned (LND does not)
|
||||||
if 'unable to locate invoice' in str(e):
|
if 'unable to locate invoice' in str(e):
|
||||||
hold_lnpayment.status = LNPayment.Status.CANCEL
|
hold_lnpayment.status = LNPayment.Status.CANCEL
|
||||||
|
# LND restarted.
|
||||||
|
if 'wallet locked, unlock it to enable full RPC access' in str(e):
|
||||||
|
self.stdout.write(str(timezone.now())+':: Wallet Locked')
|
||||||
|
# Other write to logs
|
||||||
else:
|
else:
|
||||||
self.stdout.write(str(e))
|
self.stdout.write(str(e))
|
||||||
|
|
||||||
@ -121,7 +125,7 @@ class Command(BaseCommand):
|
|||||||
except Exception as e:
|
except Exception as e:
|
||||||
self.stdout.write(str(e))
|
self.stdout.write(str(e))
|
||||||
|
|
||||||
# TODO If an lnpayment goes from LOCKED to INVGED. Totally weird
|
# TODO If a lnpayment goes from LOCKED to INVGED. Totally weird
|
||||||
# halt the order
|
# halt the order
|
||||||
if lnpayment.status == LNPayment.Status.LOCKED:
|
if lnpayment.status == LNPayment.Status.LOCKED:
|
||||||
pass
|
pass
|
@ -41,13 +41,14 @@ class NickGenerator:
|
|||||||
else:
|
else:
|
||||||
raise ValueError("Language not implemented.")
|
raise ValueError("Language not implemented.")
|
||||||
|
|
||||||
print(
|
if verbose:
|
||||||
f"{lang} SHA256 Nick Generator initialized with:"
|
print(
|
||||||
+ f"\nUp to {len(adverbs)} adverbs."
|
f"{lang} SHA256 Nick Generator initialized with:"
|
||||||
+ f"\nUp to {len(adjectives)} adjectives."
|
+ f"\nUp to {len(adverbs)} adverbs."
|
||||||
+ f"\nUp to {len(nouns)} nouns."
|
+ f"\nUp to {len(adjectives)} adjectives."
|
||||||
+ f"\nUp to {max_num+1} numerics.\n"
|
+ f"\nUp to {len(nouns)} nouns."
|
||||||
)
|
+ f"\nUp to {max_num+1} numerics.\n"
|
||||||
|
)
|
||||||
|
|
||||||
self.use_adv = use_adv
|
self.use_adv = use_adv
|
||||||
self.use_adj = use_adj
|
self.use_adj = use_adj
|
||||||
|
Reference in New Issue
Block a user