Skip to content

Commit

Permalink
Remove unused variable out_n
Browse files Browse the repository at this point in the history
  • Loading branch information
gasull committed Mar 26, 2021
1 parent 7a2ca0d commit 727f3fc
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
5 changes: 3 additions & 2 deletions electroncash/cashacct.py
Original file line number Diff line number Diff line change
Expand Up @@ -1753,14 +1753,15 @@ def undo_verifications_hook(self, txs: set):
self.minimal_ch_cache.d = {}
self.processed_blocks.d = {}

def add_transaction_hook(self, txid: str, tx: object, out_n: int, script: ScriptOutput):
def add_transaction_hook(self, txid: str, tx: object, script: ScriptOutput):
''' Called by wallet inside add_transaction (with wallet.lock held) to
notify us about transactions that were added containing a cashacct
scriptoutput. Note these tx's aren't yet in the verified set. '''
assert isinstance(script, ScriptOutput)
with self.lock:
self.wallet_reg_tx[txid] = self.RegTx(txid=txid, script=script)
self._find_script(txid, giveto='w') # makes sure there is only 1 copy in wallet_reg_tx
# makes sure there is only 1 copy in wallet_reg_tx
self._find_script(txid, giveto='w')

def remove_transaction_hook(self, txid: str):
''' Called by wallet inside remove_transaction (with wallet.lock held)
Expand Down
4 changes: 2 additions & 2 deletions electroncash/wallet.py
Original file line number Diff line number Diff line change
Expand Up @@ -1376,8 +1376,8 @@ def pop_pruned_txo(ser):
# can only do it after making sure it's the *only*
# OP_RETURN in the tx.
deferred_cashacct_add = (
lambda _tx_hash=tx_hash, _tx=tx, _n=n, _addr=addr:
self.cashacct.add_transaction_hook(_tx_hash, _tx, _n, _addr)
lambda _tx_hash=tx_hash, _tx=tx, _addr=addr:
self.cashacct.add_transaction_hook(_tx_hash, _tx, _addr)
)
elif self.is_mine(addr):
# add coin to self.txo since it's mine.
Expand Down

0 comments on commit 727f3fc

Please sign in to comment.