MCPcopy Create free account
hub / github.com/DeAI-Artist/Linkis / makeBlockIDRandom

Function makeBlockIDRandom

state/rollback_test.go:152–166  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

150}
151
152func makeBlockIDRandom() types.BlockID {
153 var (
154 blockHash = make([]byte, tmhash.Size)
155 partSetHash = make([]byte, tmhash.Size)
156 )
157 rand.Read(blockHash) //nolint: errcheck // ignore errcheck for read
158 rand.Read(partSetHash) //nolint: errcheck // ignore errcheck for read
159 return types.BlockID{
160 Hash: blockHash,
161 PartSetHeader: types.PartSetHeader{
162 Total: 123,
163 Hash: partSetHash,
164 },
165 }
166}

Callers 2

TestRollbackFunction · 0.70
setupStateStoreFunction · 0.70

Calls 1

ReadMethod · 0.45

Tested by

no test coverage detected