-
Notifications
You must be signed in to change notification settings - Fork 0
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
adv in protocol handling #10
base: dev
Are you sure you want to change the base?
Conversation
Every function is implemented |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm beside some weird length check that I probably don't understand
ether/proto0001.go
Outdated
|
||
kLength := uint(c2[0]) | ||
|
||
if uint(len(c2)-2) != kLength { // 2 is 0xeeLL |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
len(buff) -2 or len(c2) - 1 ?
c2Conn.log.Warn("Could not send pkg") | ||
} | ||
|
||
r := manager.SpawnRoom() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
doesn't it create room even if respVal is False
ether/proto0001.go
Outdated
|
||
kLength := uint(c2[0]) | ||
|
||
if uint(len(c2)-3) != kLength { // 3 is 0xabRR[LL,...] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same comment, len(buff) -3 or len(c2) - 2 ?
Current compilation errors:
# github.com/eTh3r-network/vapor/ether
ether/proto0001.go:106:36: cannot use buff (variable of type []byte) as byte value in argument to append
ether/proto0001.go:117:4: undefined: keyBuff
ether/proto0001.go:118:35: undefined: keyBuff
ether/proto0001.go:119:21: undefined: keyBuff
ether/proto0001.go:123:35: undefined: keyBuff
ether/proto0001.go:137:42: cannot use kLength (variable of type int) as uint16 value in argument to binary.LittleEndian.PutUint16
ether/proto0001.go:168:4: respVal declared and not used
ether/proto0001.go:173:42: cannot use kLength (variable of type int) as uint16 value in argument to binary.LittleEndian.PutUint16
ether/proto0001.go:196:17: manager.SpawnRoom undefined (type *Manager has no field or method SpawnRoom)