mirror of
https://github.com/GopeedLab/gopeed.git
synced 2026-11-19 06:43:42 +00:00
Bitfield msg decode
This commit is contained in:
1 parent
dbc58a209d
commit
b7347459eb
7 files changed
+181
-40
No files matched your search
+1
-1
@@ -60,7 +60,7 @@ func ParseFromFile(path string) (*MetaInfo, error) {
|
||||
var metaInfo MetaInfo
|
||||
json.Unmarshal(bytes, &metaInfo)
|
||||
if metaInfo.Info != nil {
|
||||
// Encode info hash
|
||||
// encode info hash
|
||||
info := btDecode["info"].(map[string]interface{})
|
||||
infoBtEncode := bencode.Encode(info)
|
||||
metaInfo.InfoHash = sha1.Sum(infoBtEncode[:])
|
||||
|
||||
Reference in new issue
Block a user