BlockNumber returns the block number of the chain head.
()
| 583 | |
| 584 | // BlockNumber returns the block number of the chain head. |
| 585 | func (s *PublicBlockChainAPI) BlockNumber() hexutil.Uint64 { |
| 586 | header, _ := s.b.HeaderByNumber(context.Background(), rpc.LatestBlockNumber) // latest header should always be available |
| 587 | return hexutil.Uint64(header.Number.Uint64()) |
| 588 | } |
| 589 | |
| 590 | // GetBalance returns the amount of wei for the given address in the state of the |
| 591 | // given block number. The rpc.LatestBlockNumber and rpc.PendingBlockNumber meta |
no test coverage detected