Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Sign in
net-common
net-common
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 1
    • Issues 1
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Merge Requests 0
    • Merge Requests 0
  • Wiki
    • Wiki
  • Members
    • Members
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar

新注册的用户请输入邮箱并保存,随后登录邮箱激活账号。后续可直接使用邮箱登录!

  • chainmaker
  • net-commonnet-common
  • Issues
  • #2

Closed
Open
Opened Jun 09, 2022 by Yuxuan Zhang@KingOfDark2 of 18 tasks completed2/18 tasks

拆包时计算Pkt长度时,getPktLength方法存在问题

【问题分类】

  • bug
  • P2P网络相关(包含libp2p,liquid)
  • 链账户身份与权限相关(证书问题、public、多签投票问题)
  • 核心交易引擎相关(交易池、DAG)
  • 共识相关
  • 智能合约相关
  • 存储相关
  • SDK相关
  • 长安链CMC工具
  • 长安链管理台
  • 长安链浏览器
  • 长安链合约IDE
  • 长安链web签名插件
  • 跨链相关
  • 轻节点相关
  • 隐私计算相关
  • 密码学相关
  • 其他补充:

【问题描述】(请对问题进行描述,方便定位问题)

源文件:net-common/common/pkt/bytes_disassembler.go

代码位置:https://git.chainmaker.org.cn/chainmaker/net-common/-/blob/master/common/pkt/bytes_disassembler.go#L110-113

这个 if 语句的目的是什么?是为了保证lastLen 的长度始终小于 avgLen? 但是当 pktCount != 1 时,这是恒成立的:不难计算验证 avgLen >= 512, lastLen >= avgLen ,而pktCount <=255 image

Edited Jun 09, 2022 by Yuxuan Zhang
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking
None
Due date
None
Reference: chainmaker/net-common#2

Copyright © 2021 ChainMaker Org. All Rights Reserved. 长安链 版权所有。