MCPcopy Create free account
hub / github.com/ethstorage/es-node / getDifficulty

Function getDifficulty

cmd/es-node/utils.go:159–165  ·  view source on GitHub ↗
(ctx context.Context, client *ethclient.Client, contract common.Address, shardIdx uint64)

Source from the content-addressed store, hash-verified

157}
158
159func getDifficulty(ctx context.Context, client *ethclient.Client, contract common.Address, shardIdx uint64) (*big.Int, error) {
160 res, err := getMiningInfo(ctx, client, contract, shardIdx)
161 if err != nil {
162 return nil, err
163 }
164 return res[1].(*big.Int), nil
165}
166
167func getMiningInfo(ctx context.Context, client *ethclient.Client, contract common.Address, shardIdx uint64) ([]interface{}, error) {
168 uint256Type, _ := abi.NewType("uint256", "", nil)

Callers 1

getShardListFunction · 0.85

Calls 1

getMiningInfoFunction · 0.85

Tested by

no test coverage detected