missing unmarshalling of content bytes before encoding and generation… #86
Labels
No Label
bug
C:CLI
C:Crypto
C:Encoding
C:Proto
C:Types
dependencies
docker
documentation
duplicate
enhancement
go
good first issue
help wanted
high priority
in progress
invalid
javascript
low priority
medium priority
question
Status: Stale
Type: ADR
Type: Build
Type: CI
Type: Docs
Type: Tests
urgent
wontfix
Copied from Github
Kind/Breaking
Kind/Bug
Kind/Documentation
Kind/Enhancement
Kind/Feature
Kind/Security
Kind/Testing
Priority
Critical
Priority
High
Priority
Low
Priority
Medium
Reviewed
Confirmed
Reviewed
Duplicate
Reviewed
Invalid
Reviewed
Won't Fix
Status
Abandoned
Status
Blocked
Status
Need More Info
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: cerc-io/laconicd-deprecated#86
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "fix_cid_generation"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
This is to address
https://github.com/cerc-io/laconic-sdk/issues/7
for improperly generated CID in SetRecord endpoint.
Codecov Report
Additional details and impacted files
48.92% <100.00%> (ø)
LGTM
Thanks! Please add a unit test that shows that
CIDFromJSONBytesUsingIpldPrime
andCIDFromJSONBytes
both match expected output(s)Let's remove this left over comment
Nice this simplifies things. In a separate PR we can simplify things further by getting rid of the linksystem and doing https://github.com/cerc-io/laconicd/issues/85.
In this context we don't need to pull in an entire linksystem, we can encode as dag-cbor using this, hash the output, and convert the hash into a CID using this.
Thanks for adding the test, just one small modification.
@ -0,0 +23,4 @@
}
for _, tc := range testCases {
deprecatedAndCorrect, _ := CIDFromJSONBytes([]byte(tc.content))
We should either catch any errors returned by these functions or make sure the returned result isn't
nil
/empty, because if both functions were to error out and return anil
/empty result it would evaluate them as equal and the test would pass.closed by:
https://github.com/cerc-io/laconicd/pull/88
Pull request closed