mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-05-26 17:59:29 +00:00
15 lines
290 B
Go
15 lines
290 B
Go
package health
|
|
|
|
import (
|
|
"context"
|
|
"math/big"
|
|
)
|
|
|
|
// checkBlockNumber confirms this node is aware of a specific block.
|
|
func checkBlockNumber(ec ethClient, blockNumber *big.Int) error {
|
|
_, err := ec.BlockByNumber(context.TODO(), blockNumber)
|
|
if err != nil {
|
|
return err
|
|
}
|
|
return nil
|
|
}
|