MCPcopy Create free account
hub / github.com/akash-network/node / encodeLedgerNextKey

Method encodeLedgerNextKey

x/bme/keeper/grpc_query.go:241–251  ·  view source on GitHub ↗
(remainingStates []byte, currentState byte, id types.LedgerRecordID, reverse bool)

Source from the content-addressed store, hash-verified

239}
240
241func (qs Querier) encodeLedgerNextKey(remainingStates []byte, currentState byte, id types.LedgerRecordID, reverse bool) ([]byte, error) {
242 pkBuf := make([]byte, LedgerRecordIDKey.Size(id))
243 if _, err := LedgerRecordIDKey.Encode(pkBuf, id); err != nil {
244 return nil, err
245 }
246 var unsolicited []byte
247 if reverse {
248 unsolicited = []byte{1}
249 }
250 return query.EncodePaginationKey(remainingStates, []byte{currentState}, pkBuf, unsolicited)
251}

Callers 1

LedgerRecordsMethod · 0.95

Calls 3

EncodePaginationKeyFunction · 0.92
SizeMethod · 0.45
EncodeMethod · 0.45

Tested by

no test coverage detected