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

Method WaitForBlocks

testutil/network/network.go:551–563  ·  view source on GitHub ↗

WaitForBlocks waits for the next amount of blocks to be committed, returning an error upon failure.

(blocks int64)

Source from the content-addressed store, hash-verified

549// WaitForBlocks waits for the next amount of blocks to be committed, returning an error
550// upon failure.
551func (n *Network) WaitForBlocks(blocks int64) error {
552 lastBlock, err := n.LatestHeight()
553 if err != nil {
554 return err
555 }
556
557 _, err = n.WaitForHeight(lastBlock + blocks)
558 if err != nil {
559 return err
560 }
561
562 return err
563}
564
565// Cleanup removes the root testing (temporary) directory and stops both the
566// Tendermint and API services. It allows other callers to create and start

Callers 1

SetupSuiteMethod · 0.80

Calls 2

LatestHeightMethod · 0.95
WaitForHeightMethod · 0.95

Tested by 1

SetupSuiteMethod · 0.64