Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Properly construct uint64 objects for LineageProof amounts in WalletSingletonStore's add_spend #17747

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions chia/wallet/wallet_singleton_store.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
from chia.types.condition_opcodes import ConditionOpcode
from chia.util.condition_tools import conditions_dict_for_solution
from chia.util.db_wrapper import DBWrapper2, execute_fetchone
from chia.util.ints import uint32
from chia.util.ints import uint32, uint64
from chia.wallet import singleton
from chia.wallet.lineage_proof import LineageProof
from chia.wallet.singleton import get_inner_puzzle_from_singleton, get_singleton_id_from_puzzle
Expand Down Expand Up @@ -111,10 +111,10 @@ async def add_spend(

lineage_bytes = [x.as_atom() for x in coin_state.solution.to_program().first().as_iter()]
if len(lineage_bytes) == 2:
lineage_proof = LineageProof(bytes32(lineage_bytes[0]), None, int_from_bytes(lineage_bytes[1]))
lineage_proof = LineageProof(bytes32(lineage_bytes[0]), None, uint64(int_from_bytes(lineage_bytes[1])))
else:
lineage_proof = LineageProof(
bytes32(lineage_bytes[0]), bytes32(lineage_bytes[1]), int_from_bytes(lineage_bytes[2])
bytes32(lineage_bytes[0]), bytes32(lineage_bytes[1]), uint64(int_from_bytes(lineage_bytes[2]))
)
# Create and save the new singleton record
new_record = SingletonRecord(
Expand Down
Loading