Skip to content

Commit

Permalink
Merge pull request #214 from atomicals/fix-holder
Browse files Browse the repository at this point in the history
Fix holder value error
  • Loading branch information
shadowv0vshadow authored Jun 20, 2024
2 parents 049bbf8 + ed3e3a5 commit efbf9dd
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions electrumx/server/db.py
Original file line number Diff line number Diff line change
Expand Up @@ -1492,15 +1492,13 @@ def query_holders():
atomical_output_script_key = b"po" + location
atomical_output_script_value = self.utxo_db.get(atomical_output_script_key)
location_script = atomical_output_script_value
(location_value,) = unpack_le_uint64(
atomical_active_location_value[HASHX_LEN + SCRIPTHASH_LEN : HASHX_LEN + SCRIPTHASH_LEN + 8]
)
atomical_value = self.get_uxto_atomicals_value(location, atomical_id)

script = location_script.hex()
if holder_dict.get(script, None):
holder_dict[script] += location_value
holder_dict[script] += atomical_value
else:
holder_dict[script] = location_value
holder_dict[script] = atomical_value

for script, holding in holder_dict.items():
holders.append(
Expand Down

0 comments on commit efbf9dd

Please sign in to comment.