mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-27 15:16:43 +00:00
Add RawClient method
This commit is contained in:
parent
2a41e76b39
commit
b0c6a76bee
1 changed files with 5 additions and 0 deletions
|
|
@ -36,6 +36,11 @@ func NewEthereumClient(rawurl string) (client *EthereumClient, _ error) {
|
||||||
return &EthereumClient{rawClient}, err
|
return &EthereumClient{rawClient}, err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Get the raw ethclient.Client
|
||||||
|
func (ec *EthereumClient) RawClient() *ethclient.Client {
|
||||||
|
return ec.client
|
||||||
|
}
|
||||||
|
|
||||||
// GetBlockByHash returns the given full block.
|
// GetBlockByHash returns the given full block.
|
||||||
func (ec *EthereumClient) GetBlockByHash(ctx *Context, hash *Hash) (block *Block, _ error) {
|
func (ec *EthereumClient) GetBlockByHash(ctx *Context, hash *Hash) (block *Block, _ error) {
|
||||||
rawBlock, err := ec.client.BlockByHash(ctx.context, hash.hash)
|
rawBlock, err := ec.client.BlockByHash(ctx.context, hash.hash)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue