Skip to content

Tranfering money to the same account as origin and destination #18

Description

@AntonyGuilherme

This is just to ensure that no transfer will be made considering the origin account as destination. This is a problem if we use a batch operation (two conditional updates to execute the transfer).

This will do:
random_transfer(){
from=$((RANDOM % N_ACCOUNTS))
to=$((from + 1))
if [[ $to -ge $N_ACCOUNTS ]]; then
to=0
fi
amount=1
transfer ${from} ${to} ${amount}
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions