Skip to content
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

protocol: move magic exchange to version payload #970

Merged
merged 1 commit into from
May 21, 2020

Conversation

AnnaShaleva
Copy link
Member

closes #889

@codecov
Copy link

codecov bot commented May 21, 2020

Codecov Report

Merging #970 into master will increase coverage by 0.01%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #970      +/-   ##
==========================================
+ Coverage   64.49%   64.51%   +0.01%     
==========================================
  Files         200      200              
  Lines       16841    16842       +1     
==========================================
+ Hits        10862    10865       +3     
+ Misses       5418     5416       -2     
  Partials      561      561              
Impacted Files Coverage Δ
pkg/network/message.go 51.14% <100.00%> (-1.10%) ⬇️
pkg/network/payload/version.go 100.00% <100.00%> (ø)
pkg/network/server.go 27.02% <100.00%> (+0.53%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 23b814a...64a2fb6. Read the comment docs.

@@ -160,7 +160,7 @@ func NewServer(config ServerConfig, chain blockchainer.Blockchainer, log *zap.Lo
// MkMsg creates a new message based on the server configured network and given
// parameters.
func (s *Server) MkMsg(cmd CommandType, p payload.Payload) *Message {
return NewMessage(s.Net, cmd, p)
return NewMessage(cmd, p)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This actually makes s.MkMsg() useless, we can drop it now.

@AnnaShaleva AnnaShaleva force-pushed the neo3/protocol/magic_exchange branch from 9c4810b to 64a2fb6 Compare May 21, 2020 11:25
@roman-khimov roman-khimov merged commit e6f617a into master May 21, 2020
@roman-khimov roman-khimov deleted the neo3/protocol/magic_exchange branch May 21, 2020 11:39
@roman-khimov roman-khimov added network P2P layer and removed protocol labels Sep 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
network P2P layer
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Move magic exchange to version payload (instead of sending it with each packet)
2 participants