Skip to content

Commit

Permalink
no taproot address for oracle_address
Browse files Browse the repository at this point in the history
  • Loading branch information
Ouziel committed Mar 4, 2025
1 parent 5aeadf0 commit fe5a48a
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions counterparty-core/counterpartycore/lib/messages/dispenser.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,9 @@
from counterpartycore.lib.ledger.currentstate import CurrentState
from counterpartycore.lib.parser import messagetype, protocol
from counterpartycore.lib.utils import helpers
from counterpartycore.lib.utils.address import pack as address_pack
from counterpartycore.lib.utils.address import unpack as address_unpack
from counterpartycore.lib.utils.address import pack as address_pack_new
from counterpartycore.lib.utils.address import pack_legacy as address_pack
from counterpartycore.lib.utils.address import unpack_legacy as address_unpack

logger = logging.getLogger(config.LOGGER_NAME)

Expand Down Expand Up @@ -246,6 +247,9 @@ def compose(
oracle_address: str = None,
skip_validation: bool = False,
):
if address_pack(oracle_address) != address_pack_new(oracle_address):
raise exceptions.ComposeError("Oracle address not supported by dispenser")

Check warning on line 251 in counterparty-core/counterpartycore/lib/messages/dispenser.py

View check run for this annotation

Codecov / codecov/patch

counterparty-core/counterpartycore/lib/messages/dispenser.py#L250-L251

Added lines #L250 - L251 were not covered by tests

asset_id, problems = validate(
db,
source,
Expand Down

0 comments on commit fe5a48a

Please sign in to comment.