mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-06-19 21:31:37 +00:00
parent
1bf181eda6
commit
aa88fe1d86
1 changed files with 7 additions and 0 deletions
|
|
@ -97,6 +97,13 @@ func (ec *Client) BlockNumber(ctx context.Context) (uint64, error) {
|
|||
return uint64(result), err
|
||||
}
|
||||
|
||||
// PeerCount returns the number of p2p peers as reported by the net_peerCount method.
|
||||
func (ec *Client) PeerCount(ctx context.Context) (uint64, error) {
|
||||
var result hexutil.Uint64
|
||||
err := ec.c.CallContext(ctx, &result, "net_peerCount")
|
||||
return uint64(result), err
|
||||
}
|
||||
|
||||
// BlockReceipts returns the receipts of a given block number or hash
|
||||
func (ec *Client) BlockReceipts(ctx context.Context, blockNrOrHash rpc.BlockNumberOrHash) ([]*types.Receipt, error) {
|
||||
var r []*types.Receipt
|
||||
|
|
|
|||
Loading…
Reference in a new issue