Skip to content

Commit

Permalink
Namecoin: Sort keys in JSON output of DNS dialog
Browse files Browse the repository at this point in the history
  • Loading branch information
JeremyRand committed Dec 12, 2019
1 parent 79133d5 commit 6ebc0a3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions electrum_nmc/electrum/gui/qt/configure_dns_dialog.py
Original file line number Diff line number Diff line change
Expand Up @@ -553,8 +553,8 @@ def get_value(self):
if value == {}:
return b""
else:
# Use compact encoding for JSON
return json.dumps(value, separators=(',', ':')).encode("ascii")
# Use compact, deterministic encoding for JSON
return json.dumps(value, sort_keys=True, separators=(',', ':')).encode("ascii")

def update_headers(self, headers: Union[List[str], Dict[int, str]]):
# headers is either a list of column names, or a dict: (col_idx->col_name)
Expand Down

0 comments on commit 6ebc0a3

Please sign in to comment.