MCPcopy Index your code
hub / github.com/CovenantSQL/CovenantSQL / fetchBlockByCount

Method fetchBlockByCount

worker/chainbusservice.go:159–171  ·  view source on GitHub ↗
(count uint32)

Source from the content-addressed store, hash-verified

157}
158
159func (bs *BusService) fetchBlockByCount(count uint32) (block *types.BPBlock, err error) {
160 var (
161 req = &types.FetchBlockByCountReq{
162 Count: count,
163 }
164 resp = &types.FetchBlockResp{}
165 )
166 if err = bs.requestBP(route.MCCFetchBlockByCount.String(), req, resp); err != nil {
167 return
168 }
169 block = resp.Block
170 return
171}
172
173func (bs *BusService) requestLastBlock() (
174 block *types.BPBlock, profiles []*types.SQLChainProfile, count uint32,

Callers 2

subscribeBlockMethod · 0.95
TestNewBusServiceFunction · 0.95

Calls 2

requestBPMethod · 0.95
StringMethod · 0.45

Tested by 1

TestNewBusServiceFunction · 0.76