Skip to content
Snippets Groups Projects

fix(account):if new account can't pay NewAccountTax, it must be removed

Merged Éloïs requested to merge elois-fix-60 into release/runtime-100
1 file
+ 24
2
Compare changes
  • Side-by-side
  • Inline
Feature: Balance transfer
Scenario: If alice sends 5 ĞD to Dave, Dave will get 5 ĞD
Given alice have 10 ĞD
Scenario: Create a new account with enough founds
When alice send 5 ĞD to dave
Then dave should have 5 ĞD
When 1 block later
"""
The blockchain should automatically withdraw account creation tax (3 ĞD)
"""
Then dave should have 2 ĞD
Scenario: Create a new account without enough founds then retry with enough founds
When alice send 2 ĞD to eve
Then eve should have 2 ĞD
When 1 block later
"""
The blockchain should automatically destroy Evec account
because Eve not have enough founds to pay the new account tax
"""
Then eve should have 0 ĞD
When alice send 5 ĞD to eve
Then eve should have 5 ĞD
When 1 block later
"""
The blockchain should automatically withdraw account creation tax (3 ĞD)
"""
Then eve should have 2 ĞD
Loading