Skip to content

Commit

Permalink
Merge branch 'develop' into migration
Browse files Browse the repository at this point in the history
  • Loading branch information
Ouziel committed Mar 3, 2025
2 parents 8de7352 + d19de78 commit 49f413d
Show file tree
Hide file tree
Showing 7 changed files with 5,987 additions and 5,823 deletions.
6,791 changes: 3,436 additions & 3,355 deletions apiary.apib

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions counterparty-core/counterpartycore/lib/api/apiserver.py
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ def prepare_args(route, **kwargs):
continue

str_arg = query_params().get(arg_name)
if str_arg is not None and isinstance(str_arg, str) and str_arg.lower() == "none":
if str_arg is not None and isinstance(str_arg, str) and str_arg.lower() in ["none", "null"]:
str_arg = None
if str_arg is None and arg["required"]:
raise ValueError(f"Missing required parameter: {arg_name}")
Expand Down Expand Up @@ -335,7 +335,7 @@ def handle_route(**kwargs):
# parse args
try:
function_args = prepare_args(route, **kwargs)
except ValueError as e:
except (ValueError, TypeError) as e:
return return_result(400, error=str(e), start_time=start_time, query_args=query_args)

logger.trace(f"API Request - Arguments: {function_args}")
Expand Down
386 changes: 193 additions & 193 deletions counterparty-core/counterpartycore/lib/api/queries.py

Large diffs are not rendered by default.

7 changes: 6 additions & 1 deletion counterparty-core/counterpartycore/lib/backend/bitcoind.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,12 @@

import requests
from bitcoinutils.keys import PublicKey
from requests.exceptions import ChunkedEncodingError, ConnectionError, ReadTimeout, Timeout
from requests.exceptions import ( # pylint: disable=redefined-builtin
ChunkedEncodingError,
ConnectionError,
ReadTimeout,
Timeout,
)

from counterpartycore.lib import config, exceptions
from counterpartycore.lib.ledger.currentstate import CurrentState
Expand Down
4,601 changes: 2,341 additions & 2,260 deletions counterparty-core/counterpartycore/test/integrations/regtest/apidoc/apicache.json

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -233,14 +233,13 @@ def gen_blueprint(db):

md += f"\n### {title} "

first_query_arg = True
query_params = []
for arg in route["args"]:
if f"{{{arg['name']}}}" in blueprint_path:
continue
else:
prefix = "?" if first_query_arg else "&"
first_query_arg = False
blueprint_path += f"{{{prefix}{arg['name']}}}"
query_params.append(arg["name"])
blueprint_path += f"{{?{','.join(query_params)}}}" if query_params else ""
md += f"[GET {blueprint_path}]\n\n"

md += route["description"].strip()
Expand Down Expand Up @@ -271,9 +270,9 @@ def gen_blueprint(db):
example_arg = f": `{example_args[arg['name']]}`"
elif arg["name"] == "verbose":
example_arg = ": `true`"
md += f" + {arg['name']}{example_arg} ({arg['type']}, {required}) - {description}\n"
md += f" + {arg['name']}{example_arg} ({arg['type']}, {required}) - {description.replace('_', '-')}\n"
if not arg["required"]:
md += f" + Default: `{arg.get('default', '')}`\n"
md += f" + Default: `{arg.get('default', '') or 'null'}`\n"
if "members" in arg:
md += " + Members\n"
for member in arg["members"]:
Expand Down
10 changes: 4 additions & 6 deletions release-notes/release-notes-v10.10.1.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,10 @@

# Upgrading

Breaking Changes:
The commands `get_asset_names` and `get_asset_longnames` have been removed from API v1. If you are using these commands, you must replace them with the following endpoint: `/v2/assets`.
**Breaking Changes:**
The commands `get_asset_names` and `get_asset_longnames` have been removed from API v1, as they are buggy and extremely non-performant. If you are using these endpoints, you must replace them with `/v2/assets`.

**IMPORTANT**
- If you are running a version lower than 10.9.0, you must first update to 10.9.0 and only then install v10.10.0.

Download the latest version of `counterparty-core` and restart `counterparty-server`.
To upgrade, download the latest version of `counterparty-core` and restart `counterparty-server`.

With Docker Compose:

Expand Down Expand Up @@ -47,6 +44,7 @@ counterparty-server start
- Fix ungraceful Waitress shutdown
- Handle RSFetcher version mismatch error correctly
- Handle Counterparty Server version checking errors correctly
- Fixed handling of `TypeError` in API calls

## Codebase

Expand Down

0 comments on commit 49f413d

Please sign in to comment.