Skip to content

Commit

Permalink
feat: excluded @world from readLockAccounts
Browse files Browse the repository at this point in the history
  • Loading branch information
ascandone committed Sep 2, 2024
1 parent 6e77fbe commit 8494a04
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,9 @@ func (p *parseVisitor) VisitDestinationRecursive(c parser.IDestinationContext) *
errors.New("wrong type: expected account as destination"),
)
}
p.readLockAccounts[*destAddr] = struct{}{}
if !p.isWorld(*destAddr) {
p.readLockAccounts[*destAddr] = struct{}{}
}
p.AppendInstruction(program.OP_SEND)
return nil
case *parser.DestInOrderContext:
Expand Down
5 changes: 4 additions & 1 deletion components/ledger/internal/machine/vm/machine_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -991,7 +991,10 @@ func TestNeededBalances(t *testing.T) {
// we don't want to lock unbounded overdrafts account
@unb allowing unbounded overdraft
}
destination = @c
destination = {
max [GEM 1] to @c
remaining to @world
}
)`)

if err != nil {
Expand Down

0 comments on commit 8494a04

Please sign in to comment.