Skip to content

Commit 6bcb950

Browse files
authored
Test that follow-chain also works with child chains. (#3887)
## Motivation There were some reports of `sync` after `follow-chain` not working. `follow-chain` is only used directly after `forget-chain` (for the same chain) in the tests currently, so that the chain is still in the database. ## Proposal Also test `follow_chain` in `test_end_to_end_assign_greatgrandchild_chain`. ## Test Plan This seems fine on `main`. I will backport this to `testnet_babbage`. ## Release Plan - Backport to `testnet_babbage` and fix, if necessary. ## Links - [reviewer checklist](https://github.com/linera-io/linera-protocol/blob/main/CONTRIBUTING.md#reviewer-checklist)
1 parent 0187ca1 commit 6bcb950

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

linera-service/tests/linera_net_tests.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3073,6 +3073,9 @@ async fn test_end_to_end_assign_greatgrandchild_chain(config: impl LineraNetConf
30733073
let client2 = net.make_client().await;
30743074
client2.wallet_init(&[], FaucetOption::None).await?;
30753075

3076+
let client3 = net.make_client().await;
3077+
client3.wallet_init(&[], FaucetOption::None).await?;
3078+
30763079
let chain1 = *client1.load_wallet()?.chain_ids().first().unwrap();
30773080

30783081
// Generate keys for client 2.
@@ -3097,6 +3100,11 @@ async fn test_end_to_end_assign_greatgrandchild_chain(config: impl LineraNetConf
30973100
client2.process_inbox(chain2).await?;
30983101
assert!(client2.local_balance(account2).await? > Amount::ZERO);
30993102

3103+
// Verify that a third party can also follow the chain.
3104+
client3.follow_chain(chain2).await?;
3105+
client3.sync(chain2).await?;
3106+
assert!(client3.local_balance(account2).await? > Amount::ZERO);
3107+
31003108
net.ensure_is_running().await?;
31013109
net.terminate().await?;
31023110

0 commit comments

Comments
 (0)