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

Function NewAnswer

sqlchain/storageproof.go:37–43  ·  view source on GitHub ↗

NewAnswer generates an answer for storage proof.

(previousBlockID BlockID, nodeID proto.NodeID, answer hash.Hash)

Source from the content-addressed store, hash-verified

35
36// NewAnswer generates an answer for storage proof.
37func NewAnswer(previousBlockID BlockID, nodeID proto.NodeID, answer hash.Hash) *Answer {
38 return &Answer{
39 PreviousBlockID: previousBlockID,
40 NodeID: nodeID,
41 Answer: answer,
42 }
43}
44
45// getNextPuzzle generate new puzzle which ask other nodes to get a specified record in database.
46// The index of next SQL (puzzle) is determined by the previous answer and previous block hash.

Callers 3

GenerateAnswerFunction · 0.85
TestNewAnswerFunction · 0.85
TestGenerateAnswerFunction · 0.85

Calls

no outgoing calls

Tested by 2

TestNewAnswerFunction · 0.68
TestGenerateAnswerFunction · 0.68