Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion contracts/CptController.sol
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ contract CptController {
intArray[0] = cptVersion;
int created = cptIntArray[1];
intArray[1] = created;
cptData.putCpt(cptId, publisher, intArray, bytes32Array, jsonSchemaArray, v, r, s);
cptData.updateCpt(cptId, publisher, intArray, bytes32Array, jsonSchemaArray, v, r, s);
UpdateCptRetLog(0, cptId, cptVersion);
return true;
} else {
Expand Down
23 changes: 23 additions & 0 deletions contracts/CptData.sol
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,29 @@ contract CptData {
return true;
}

function updateCpt(
uint cptId,
address cptPublisher,
int[8] cptIntArray,
bytes32[8] cptBytes32Array,
bytes32[128] cptJsonSchemaArray,
uint8 cptV,
bytes32 cptR,
bytes32 cptS
)
public
returns (bool)
{
cptMap[cptId].signature.v=cptV;
cptMap[cptId].signature.r=cptR;
cptMap[cptId].signature.s=cptS;
cptMap[cptId].publisher=cptPublisher;
cptMap[cptId].intArray=cptIntArray;
cptMap[cptId].bytes32Array=cptBytes32Array;
cptMap[cptId].jsonSchemaArray=cptJsonSchemaArray;
return true;
}

function getCptId(
address publisher
)
Expand Down