minor fixups
This commit is contained in:
parent
3194cec8df
commit
31a80ccce4
3 changed files with 18 additions and 9 deletions
|
@ -49,13 +49,14 @@ Code | Name | Message | Comment
|
|||
300 | TransactionRejected | Transaction rejected, unknown reason.
|
||||
301 | TransactionFeeTooLow | Fee too low.
|
||||
302 | TransactionInvalidSignature | Invalid signature.
|
||||
**31x** | InsufficientFunds | Insufficient funds. | determined by wallet prior to attempting to broadcast a tx; this is different for example from a TX being created and sent but then rejected by lbrycrd for unspendable utxos.
|
||||
**31x** | Balance | Errors related to your available balance.
|
||||
311 | InsufficientFunds | Insufficient funds. | determined by wallet prior to attempting to broadcast a tx; this is different for example from a TX being created and sent but then rejected by lbrycrd for unspendable utxos.
|
||||
**32x** | ChannelSigning | Channel signing.
|
||||
320 | ChannelKeyNotFound | Channel signing key not found.
|
||||
321 | ChannelKeyInvalid | Channel signing key is out of date. | For example, channel was updated but you don't have the updated key.
|
||||
**33x** | GeneralResolve | Errors while resolving urls.
|
||||
331 | Resolve | Failed to resolve '{uri}'.
|
||||
332 | ResolveTimeout | Failed to resolve '{uri}' within the timeout.
|
||||
331 | Resolve | Failed to resolve '{url}'.
|
||||
332 | ResolveTimeout | Failed to resolve '{url}' within the timeout.
|
||||
**4xx** | Blob | **Blobs**
|
||||
**40x** | BlobAvailability | Blob availability.
|
||||
400 | BlobNotFound | Blob not found.
|
||||
|
|
|
@ -287,11 +287,19 @@ class TransactionInvalidSignatureError(TransactionRejectionError):
|
|||
super().__init__("Invalid signature.")
|
||||
|
||||
|
||||
class InsufficientFundsError(BlockchainError):
|
||||
class BalanceError(BlockchainError):
|
||||
"""
|
||||
Errors related to your available balance.
|
||||
"""
|
||||
|
||||
|
||||
class InsufficientFundsError(BalanceError):
|
||||
"""
|
||||
determined by wallet prior to attempting to broadcast a tx; this is different for example from a TX
|
||||
being created and sent but then rejected by lbrycrd for unspendable utxos.
|
||||
"""
|
||||
def __init__(self):
|
||||
super().__init__("Insufficient funds.")
|
||||
|
||||
|
||||
class ChannelSigningError(BlockchainError):
|
||||
|
@ -320,13 +328,13 @@ class GeneralResolveError(BlockchainError):
|
|||
|
||||
|
||||
class ResolveError(GeneralResolveError):
|
||||
def __init__(self, uri):
|
||||
super().__init__(f"Failed to resolve '{uri}'.")
|
||||
def __init__(self, url):
|
||||
super().__init__(f"Failed to resolve '{url}'.")
|
||||
|
||||
|
||||
class ResolveTimeoutError(GeneralResolveError):
|
||||
def __init__(self, uri):
|
||||
super().__init__(f"Failed to resolve '{uri}' within the timeout.")
|
||||
def __init__(self, url):
|
||||
super().__init__(f"Failed to resolve '{url}' within the timeout.")
|
||||
|
||||
|
||||
class BlobError(BaseError):
|
||||
|
|
|
@ -47,7 +47,7 @@ def main():
|
|||
if len(args) > 1:
|
||||
fmt = "f"
|
||||
if comment:
|
||||
comment = f'\n{INDENT}"""\n{INDENT}{comment}\n{INDENT}"""'
|
||||
comment = f'\n{INDENT}"""\n{indent(fill(comment, 100), INDENT)}\n{INDENT}"""'
|
||||
print((CLASS+INIT).format(
|
||||
name=code, parent=parent, args=', '.join(args),
|
||||
desc=desc, doc=comment, format=fmt
|
||||
|
|
Loading…
Reference in a new issue