MCPcopy Create free account
hub / github.com/akash-network/node / WaitForNextBlock

Method WaitForNextBlock

testutil/network/network.go:535–547  ·  view source on GitHub ↗

WaitForNextBlock waits for the next block to be committed, returning an error upon failure.

()

Source from the content-addressed store, hash-verified

533// WaitForNextBlock waits for the next block to be committed, returning an error
534// upon failure.
535func (n *Network) WaitForNextBlock() error {
536 lastBlock, err := n.LatestHeight()
537 if err != nil {
538 return err
539 }
540
541 _, err = n.WaitForHeight(lastBlock + 1)
542 if err != nil {
543 return err
544 }
545
546 return err
547}
548
549// WaitForBlocks waits for the next amount of blocks to be committed, returning an error
550// upon failure.

Callers 15

SetupSuiteMethod · 0.80
SetupSuiteMethod · 0.80
TestDeploymentMethod · 0.80
TestGroupMethod · 0.80
TestFundedDeploymentMethod · 0.80
SetupSuiteMethod · 0.80
TestGenerateParseMethod · 0.80
TestProviderMethod · 0.80
SetupSuiteMethod · 0.80
SetupSuiteMethod · 0.80

Calls 2

LatestHeightMethod · 0.95
WaitForHeightMethod · 0.95

Tested by 15

SetupSuiteMethod · 0.64
SetupSuiteMethod · 0.64
TestDeploymentMethod · 0.64
TestGroupMethod · 0.64
TestFundedDeploymentMethod · 0.64
SetupSuiteMethod · 0.64
TestGenerateParseMethod · 0.64
TestProviderMethod · 0.64
SetupSuiteMethod · 0.64
SetupSuiteMethod · 0.64