Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix license validation #165

Merged
merged 3 commits into from
Feb 2, 2021
Merged
Changes from all commits
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
8 changes: 3 additions & 5 deletions daemon/processing/claim.go
Original file line number Diff line number Diff line change
Expand Up @@ -351,13 +351,11 @@ func setTags(claim *model.Claim, tags []string) error {

func setLicense(claim *model.Claim, stream pb.Stream) {
license := stream.GetLicense()
if len(license) > 500 {
license = license[:500]
if len([]rune(license)) > 500 {
license = string([]rune(license)[:500])
}
if utf8.ValidString(license) {
//issue with liscense at block height 891070 txid 5e06c03b5457732213fc9d5a9e32abb8a5ee22e5762f28da8851e0999fbbe970
// Error 1366: Incorrect string value: '\xC3' for column 'license' at row 1
//claim.License.SetValid(license)
claim.License.SetValid(license)
}

liscenseURL := stream.GetLicenseUrl()
Expand Down