Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/cid-pk' into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
457813723 committed Mar 7, 2024
2 parents f48f52c + a0aa3ff commit 23e6beb
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions dao/dao.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ func NewGormDB(dbMysql, parserMysql config.DbMysql, autoMigrate bool) (*DbDao, e
&tables.TableBlockParserInfo{},
&tables.TableAvatarNotes{},
&tables.TableCidInfo{},
&tables.TableCidPk{},
); err != nil {
return nil, err
}
Expand Down
2 changes: 1 addition & 1 deletion http_server/handle/store_cid_pk.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ func (h *HttpHandle) doStoreCidPk(req *ReqStoreCidPk, apiResp *http_api.ApiResp)
signMsg := req.Msg
signature := req.Signature
address := signAddressHex.AddressHex
if address[20:] != hex.EncodeToString(common.CalculateCid1(req.Cid)) {
if address[:20] != hex.EncodeToString(common.CalculateCid1(req.Cid)) {
apiResp.ApiRespErr(http_api.ApiCodeParamsInvalid, "cid err")
return nil
}
Expand Down

0 comments on commit 23e6beb

Please sign in to comment.