fix hash references

This commit is contained in:
Victor Shyba 2019-03-20 15:43:45 -03:00 committed by Lex Berezhny
parent ab87588250
commit 071ab32ab7
2 changed files with 2 additions and 2 deletions

View file

@ -56,7 +56,7 @@ class LBRYBlockProcessor(BlockProcessor):
self.logger.error("REJECTED: {} updating {}".format(*info))
for txin in tx.inputs:
if txin not in update_inputs:
abandoned_claim_id = self.db.abandon_spent(txin.txo_ref.hash, txin.txo_ref.position)
abandoned_claim_id = self.db.abandon_spent(txin.txo_ref.tx_ref.hash, txin.txo_ref.position)
if abandoned_claim_id:
add_undo((abandoned_claim_id, self.db.get_claim_info(abandoned_claim_id)))
return undo_info

View file

@ -166,7 +166,7 @@ class LBRYDB(DB):
if not claim_info:
return False
for input in inputs:
if input.txo_ref.hash == claim_info.txid and input.txo_ref.position == claim_info.nout:
if (input.txo_ref.tx_ref.hash, input.txo_ref.position) == (claim_info.txid, claim_info.nout):
return input
return False