Skip to content

Commit

Permalink
fix: use balance to order transactions
Browse files Browse the repository at this point in the history
Sort by balance instead of timestamp in case multiple transactions were executed at the same time. So far there have been no outgoing transactions from the nemesis account and none are expected, so the balance is strictly increasing.
  • Loading branch information
baderj committed Oct 5, 2022
1 parent badafa5 commit 54088cf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion orchard/dga.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ def get_blockchain_seed(when, updated: bool = False) -> str:

transactions = sorted(
transactions.values(),
key=lambda x: x['time'],
key=lambda x: x['balance'],
reverse=True
)
ntx = len(transactions) + 1
Expand Down

0 comments on commit 54088cf

Please sign in to comment.