-
Notifications
You must be signed in to change notification settings - Fork 524
Closed
Description
waitForBlock does not wait for the given block, but waits for the next block:
https://github.com/algorand/go-algorand/blob/master/daemon/algod/api/server/v2/handlers.go#L328
https://github.com/algorand/go-algorand/blob/master/daemon/algod/api/server/v1/handlers/handlers.go#L629
Even though the end-point is named "wait-for-block-after", the docs say --- https://developer.algorand.org/docs/reference/rest-apis/algod/v2/#get-v2statuswait-for-block-afterround --- "Gets the node status after waiting for the given round." meaning "/v2/status/wait-for-block/after/5" means "Gets the node status after waiting for round 5" (and that's the way the Indexer uses it)
This is easy to fix, just remove the + 1 on those two lines.