linera-io / linera-protocol

Main repository for the Linera protocol
Apache License 2.0
112 stars 94 forks source link

Fix unrelated error in test due to a chain with zero balance #2179

Closed jvff closed 1 week ago

jvff commented 1 week ago

Motivation

When running test_open_chain_node_service, sometimes an error message would appear saying that there was a failure to receive a message due to insufficient funds. This happened because the test would create a new chain without providing it any tokens and ignore it for the rest of the chain. The error could be ignored, but while debugging another issue in the test, the error message led to a false lead that took some time away from the root cause.

Proposal

Provide 1 token to the newly created chain.

Test Plan

After this fix, the error message does not appear anymore.

Release Plan

Only fixes a bug in a test, so nothing is needed.

Links

jvff commented 1 week ago

Nice catch :) Did this not cause the test to fail?

It didn't because nothing was asserted on that new chain. The only assertion was if the parent chain was able to execute the open chain operation.