Skip to content

Commit

Permalink
Wait for next block in tests to confirm
Browse files Browse the repository at this point in the history
  • Loading branch information
xssnick committed Mar 21, 2024
1 parent c634f3f commit 41495eb
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion ton/jetton/integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ func TestJettonMasterClient_Transfer(t *testing.T) {
}

// wait next block to be sure everything updated
_, _ = api.WaitForBlock(block.SeqNo + 1).GetMasterchainInfo(ctx)
_, _ = api.WaitForBlock(block.SeqNo + 3).GetMasterchainInfo(ctx)

b2, err := tokenWallet.GetBalanceAtBlock(ctx, block)
if err != nil {
Expand Down
2 changes: 1 addition & 1 deletion ton/nft/integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ func Test_NftMintTransfer(t *testing.T) {
}

// wait next block to be sure everything updated
_, _ = api.WaitForBlock(block.SeqNo + 1).GetMasterchainInfo(ctx)
_, _ = api.WaitForBlock(block.SeqNo + 3).GetMasterchainInfo(ctx)

newData, err := nft.GetNFTDataAtBlock(ctx, block)
if err != nil {
Expand Down
2 changes: 2 additions & 0 deletions ton/payments/integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,8 @@ func TestClient_DeployAsyncChannel(t *testing.T) {
t.Fatal(fmt.Errorf("failed to deploy channel: %w", err))
}

client.api.WaitForBlock(block.SeqNo + 3).GetMasterchainInfo(context.Background())

ch, err := client.GetAsyncChannel(context.Background(), block, channelAddr, true)
if err != nil {
t.Fatal(fmt.Errorf("failed to get channel: %w", err))
Expand Down

0 comments on commit 41495eb

Please sign in to comment.