Skip to content

Commit ac68a8d

Browse files
committed
fix imports after rebase
1 parent c47c289 commit ac68a8d

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

hathor/transaction/base_transaction.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -428,7 +428,7 @@ def get_tx_parents(self) -> set[bytes]:
428428
def get_related_addresses(self) -> set[str]:
429429
""" Return a set of addresses collected from tx's inputs and outputs.
430430
"""
431-
from hathor.transaction.script.scripts import parse_address_script
431+
from hathor.transaction.script.construct import parse_address_script
432432

433433
assert self.storage is not None
434434
addresses: set[str] = set()
@@ -1118,8 +1118,8 @@ def can_melt_token(self) -> bool:
11181118
def to_human_readable(self) -> dict[str, Any]:
11191119
"""Checks what kind of script this is and returns it in human readable form
11201120
"""
1121+
from hathor.transaction.script.construct import parse_address_script
11211122
from hathor.transaction.script.nano_contract_match_values import NanoContractMatchValues
1122-
from hathor.transaction.script.scripts import parse_address_script
11231123

11241124
script_type = parse_address_script(self.script)
11251125
if script_type:

hathor/verification/transaction_verifier.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ def verify_without_storage(self, tx: Transaction) -> None:
121121
def verify_sigops_input(self, tx: Transaction) -> None:
122122
""" Count sig operations on all inputs and verify that the total sum is below the limit
123123
"""
124-
from hathor.transaction.scripts import get_sigops_count
124+
from hathor.transaction.script.construct import get_sigops_count
125125
from hathor.transaction.storage.exceptions import TransactionDoesNotExist
126126
n_txops = 0
127127
for tx_input in tx.inputs:
@@ -183,7 +183,7 @@ def verify_script(self, *, tx: Transaction, input_tx: TxInput, spent_tx: BaseTra
183183
:type input_tx: TxInput
184184
:type spent_tx: Transaction
185185
"""
186-
from hathor.transaction.scripts import script_eval
186+
from hathor.transaction.script.execution import script_eval
187187
try:
188188
script_eval(tx, input_tx, spent_tx)
189189
except ScriptError as e:

hathor/verification/vertex_verifier.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ def verify_number_of_outputs(self, vertex: BaseTransaction) -> None:
165165
def verify_sigops_output(self, vertex: BaseTransaction) -> None:
166166
""" Count sig operations on all outputs and verify that the total sum is below the limit
167167
"""
168-
from hathor.transaction.scripts import get_sigops_count
168+
from hathor.transaction.script.construct import get_sigops_count
169169
n_txops = 0
170170

171171
for tx_output in vertex.outputs:

tests/tx/test_verification.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
from hathor.crypto.util import get_address_from_public_key
1818
from hathor.manager import HathorManager
1919
from hathor.transaction import BitcoinAuxPow, Block, MergeMinedBlock, Transaction, TxInput, TxOutput
20-
from hathor.transaction.scripts import P2PKH
20+
from hathor.transaction.script.p2pkh import P2PKH
2121
from hathor.transaction.token_creation_tx import TokenCreationTransaction
2222
from hathor.transaction.validation_state import ValidationState
2323
from hathor.verification.block_verifier import BlockVerifier

0 commit comments

Comments
 (0)