Skip to content

Instantly share code, notes, and snippets.

@ulope
Created September 21, 2018 17:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ulope/7fad24474a17056fd45f70960f01feea to your computer and use it in GitHub Desktop.
Save ulope/7fad24474a17056fd45f70960f01feea to your computer and use it in GitHub Desktop.
token:
nodes:
range:
first: 1
last: 3
template: "localhost:50{:02d}"
scenario:
serial:
tasks:
- parallel:
tasks:
- open_channel: {from: 0, to: 1, total_deposit: 100}
- open_channel: {from: 1, to: 2, total_deposit: 100}
- parallel:
tasks:
- assert: {from: 0, to: 1, total_deposit: 100, balance: 100, state: "opened"}
- assert: {from: 1, to: 0, total_deposit: 0, balance: 0, state: "opened"}
- assert: {from: 1, to: 2, total_deposit: 100, balance: 100, state: "opened"}
- assert: {from: 2, to: 1, total_deposit: 0, balance: 0, state: "opened"}
- parallel:
tasks:
- deposit: {from: 1, to: 0, total_deposit: 100}
- deposit: {from: 2, to: 1, total_deposit: 100}
- parallel:
tasks:
- assert: {from: 0, to: 1, total_deposit: 100, balance: 100, state: "opened"}
- assert: {from: 1, to: 0, total_deposit: 100, balance: 100, state: "opened"}
- assert: {from: 1, to: 2, total_deposit: 100, balance: 100, state: "opened"}
- assert: {from: 2, to: 1, total_deposit: 100, balance: 100, state: "opened"}
- serial:
repeat: 10
tasks:
- parallel:
repeat: 5
tasks:
- transfer: {from: 0, to: 1, amount: 1}
- transfer: {from: 1, to: 2, amount: 1}
- parallel:
repeat: 5
tasks:
- transfer: {from: 1, to: 0, amount: 1}
- transfer: {from: 2, to: 1, amount: 1}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment