Function
NewESAPI
(config *RPCConfig, sm *ethstorage.StorageManager, dl *downloader.Downloader, lg log.Logger)
Source from the content-addressed store, hash-verified
| 31 | ) |
| 32 | |
| 33 | func NewESAPI(config *RPCConfig, sm *ethstorage.StorageManager, dl *downloader.Downloader, lg log.Logger) *esAPI { |
| 34 | return &esAPI{ |
| 35 | rpcCfg: config, |
| 36 | sm: sm, |
| 37 | dl: dl, |
| 38 | lg: lg, |
| 39 | } |
| 40 | } |
| 41 | |
| 42 | func (api *esAPI) GetBlob(kvIndex uint64, blobHash common.Hash, decodeType DecodeType, off, size uint64) (hexutil.Bytes, error) { |
| 43 | blob := api.dl.Cache.GetKeyValueByIndex(kvIndex, blobHash) |
Tested by
no test coverage detected