Arithmetic underflow in balance transfer integration test
An integration test added in 7f9f2d27 reveals a bug.
To replicate:
# 1. checkout this commit
# 2. run the test
cargo test -p gdev-runtime test_simple_transfer
# 3. this is the output
running 1 test
test test_simple_transfer ... FAILED
failures:
---- test_simple_transfer stdout ----
thread 'test_simple_transfer' panicked at runtime/gdev/tests/integration_tests.rs:1098:9:
Expected Ok(_). Got Err(
DispatchErrorWithPostInfo {
post_info: PostDispatchInfo {
actual_weight: None,
pays_fee: Pays::Yes,
},
error: Arithmetic(
Underflow,
),
},
)
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
failures:
test_simple_transfer
test result: FAILED. 0 passed; 1 failed; 0 ignored; 0 measured; 24 filtered out; finished in 1.64s
(this bug was already here before !182 (merged))
Edited by Hugo Trentesaux