adb: (trivial) receive_tx_callback: make tx_height param kw-only
This commit is contained in:
@@ -434,7 +434,7 @@ class AddressSynchronizer(Logger, EventListener):
|
||||
children |= self.get_depending_transactions(other_hash)
|
||||
return children
|
||||
|
||||
def receive_tx_callback(self, tx: Transaction, tx_height: int) -> None:
|
||||
def receive_tx_callback(self, tx: Transaction, *, tx_height: int) -> None:
|
||||
txid = tx.txid()
|
||||
assert txid is not None
|
||||
self.add_unverified_or_unconfirmed_tx(txid, tx_height)
|
||||
|
||||
@@ -240,7 +240,7 @@ class Synchronizer(SynchronizerBase):
|
||||
if tx_hash != tx.txid():
|
||||
raise SynchronizerFailure(f"received tx does not match expected txid ({tx_hash} != {tx.txid()})")
|
||||
tx_height = self.requested_tx.pop(tx_hash)
|
||||
self.adb.receive_tx_callback(tx, tx_height)
|
||||
self.adb.receive_tx_callback(tx, tx_height=tx_height)
|
||||
self.logger.info(f"received tx {tx_hash} height: {tx_height} bytes: {len(raw_tx)}")
|
||||
|
||||
async def main(self):
|
||||
|
||||
Reference in New Issue
Block a user