| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| PersistOfferRequestKind byte = 0x02 | ||
| ) | ||
|
|
||
| var ErrNilContentKey = errors.New("content key cannot be nil") |
There was a problem hiding this comment.
shouldn't these all be moved to content_storage.go?
Sorry, something went wrong.
There was a problem hiding this comment.
this err is return from the PortalProtocol before call the content_storage, so this should be in PortalProtocol
Sorry, something went wrong.
| } | ||
|
|
||
| func NewPortalProtocol(config *PortalProtocolConfig, protocolId string, privateKey *ecdsa.PrivateKey, storage Storage, contentQueue chan *ContentElement) (*PortalProtocol, error) { | ||
| func defaultContentIdFunc(contentKey []byte) []byte { |
There was a problem hiding this comment.
same as above?
Sorry, something went wrong.
There was a problem hiding this comment.
this should be in PortalProtocol, storage do not care about the contentKey to contentId
Sorry, something went wrong.
| args[i] = id | ||
| } | ||
|
|
||
| // 执行删除操作 |
There was a problem hiding this comment.
don't use Chinese comment
Sorry, something went wrong.
| return res | ||
| } | ||
|
|
||
| func defaultContentIdFunc(contentKey []byte) []byte { |
There was a problem hiding this comment.
Duplicate?
Sorry, something went wrong.
There was a problem hiding this comment.
yes, I will delete it, the content storage not care about how the contentKey tranform to contentId
Sorry, something went wrong.
| maxDistance = uint256.MustFromHex("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff") | ||
| ) | ||
|
|
||
| const ( |
There was a problem hiding this comment.
const before var
Sorry, something went wrong.
| ORDER BY distance DESC` | ||
| ) | ||
|
|
||
| type ContentStorage struct { |
There was a problem hiding this comment.
public method comments not follow go standard
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
impl content storage #9