Skip to content

Commit

Permalink
AnalyzedTransaction: fix that when transfering to self, write set has…
Browse files Browse the repository at this point in the history
… duplication
  • Loading branch information
msmouse committed Aug 28, 2023
1 parent 0371bc7 commit 3636e8a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion types/src/transaction/analyzed_transaction.rs
Original file line number Diff line number Diff line change
Expand Up @@ -122,8 +122,10 @@ impl AnalyzedTransaction {
let mut write_hints = vec![
Self::account_resource_location(sender_address),
Self::coin_store_location(sender_address),
Self::coin_store_location(receiver_address),
];
if sender_address != receiver_address {
write_hints.push(Self::coin_store_location(receiver_address));
}
if !receiver_exists {
// If the receiver doesn't exist, we create the receiver account, so we need to write the
// receiver account resource.
Expand Down

0 comments on commit 3636e8a

Please sign in to comment.