github.com/algorand/go-algorand-sdk@v1.24.0/client/v2/algod/waitForBlock.go (about) 1 package algod 2 3 import ( 4 "context" 5 "fmt" 6 7 "github.com/algorand/go-algorand-sdk/client/v2/common" 8 "github.com/algorand/go-algorand-sdk/client/v2/common/models" 9 ) 10 11 // StatusAfterBlock waits for a block to appear after round {round} and returns the 12 // node's status at the time. 13 type StatusAfterBlock struct { 14 c *Client 15 16 round uint64 17 } 18 19 // Do performs the HTTP request 20 func (s *StatusAfterBlock) Do(ctx context.Context, headers ...*common.Header) (response models.NodeStatus, err error) { 21 err = s.c.get(ctx, &response, fmt.Sprintf("/v2/status/wait-for-block-after/%s", common.EscapeParams(s.round)...), nil, headers) 22 return 23 }