Skip to content

Commit

Permalink
rpc in batch
Browse files Browse the repository at this point in the history
  • Loading branch information
Ouziel committed Feb 20, 2025
1 parent b5f44c0 commit 28ca7cc
Show file tree
Hide file tree
Showing 7 changed files with 1,452 additions and 160 deletions.
2 changes: 2 additions & 0 deletions counterparty-core/counterpartycore/lib/backend/bitcoind.py
Original file line number Diff line number Diff line change
Expand Up @@ -542,6 +542,7 @@ def list_unspent(source, allow_unconfirmed_inputs):
def get_vin_info(vin, no_retry=False):
vin_info = vin.get("info")
if vin_info is None:
logger.error("vin info not found")
try:
vin_ctx = get_decoded_transaction(vin["hash"], no_retry=no_retry)
is_segwit = vin_ctx["segwit"]
Expand All @@ -550,6 +551,7 @@ def get_vin_info(vin, no_retry=False):
except exceptions.BitcoindRPCError as e:
raise exceptions.DecodeError("vin not found") from e

Check warning on line 552 in counterparty-core/counterpartycore/lib/backend/bitcoind.py

View check run for this annotation

Codecov / codecov/patch

counterparty-core/counterpartycore/lib/backend/bitcoind.py#L543-L552

Added lines #L543 - L552 were not covered by tests
else:
logger.warning("Using cached vin info")
return vin_info["value"], vin_info["script_pub_key"], vin_info["is_segwit"]

Check warning on line 555 in counterparty-core/counterpartycore/lib/backend/bitcoind.py

View check run for this annotation

Codecov / codecov/patch

counterparty-core/counterpartycore/lib/backend/bitcoind.py#L554-L555

Added lines #L554 - L555 were not covered by tests


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ def __init__(self, indexer_config=None):
"log_file": config.FETCHER_LOG,
"json_format": config.JSON_LOGS,
"only_write_in_reorg_window": True,
"log_level": "error",
}
if (
isinstance(config.LOG_EXCLUDE_FILTERS, list)
Expand Down
Loading

0 comments on commit 28ca7cc

Please sign in to comment.