Skip to content
This repository was archived by the owner on Oct 28, 2021. It is now read-only.

Enable Warp server only if we have snapshot #4718

Merged
merged 1 commit into from
Dec 27, 2017
Merged

Conversation

gumb0
Copy link
Member

@gumb0 gumb0 commented Dec 22, 2017

Previously it always created Warp capability and reported snapshot number 0, snapshot hash 0.

Also imported snapshot path construction was duplicated in SnapshotImporter and WarpHostCapability, now it's in a single place in importedSnapshotPath()

@gumb0 gumb0 force-pushed the no-snapshot-no-warp branch from 25339df to 01f6f82 Compare December 22, 2017 13:12
@gumb0 gumb0 requested a review from chfast December 22, 2017 13:17
@codecov-io
Copy link

codecov-io commented Dec 22, 2017

Codecov Report

Merging #4718 into develop will decrease coverage by <.01%.
The diff coverage is 37.5%.

Impacted file tree graph

@@             Coverage Diff             @@
##           develop    #4718      +/-   ##
===========================================
- Coverage    60.72%   60.72%   -0.01%     
===========================================
  Files          347      347              
  Lines        27221    27224       +3     
  Branches      2853     2849       -4     
===========================================
  Hits         16531    16531              
- Misses        9693     9704      +11     
+ Partials       997      989       -8

@@ -33,29 +33,24 @@ void WarpPeerCapability::init(unsigned _hostProtocolVersion, u256 _hostNetworkId
u256 _chainTotalDifficulty, h256 _chainCurrentHash, h256 _chainGenesisHash,
std::shared_ptr<SnapshotStorageFace const> _snapshot)
{
assert(_snapshot);
m_snapshot = _snapshot;
Copy link
Member

Choose a reason for hiding this comment

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

std::move the shared pointer.

Copy link
Member

@chfast chfast left a comment

Choose a reason for hiding this comment

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

Actually, this can be merged when the single fix is applied.

@gumb0 gumb0 force-pushed the no-snapshot-no-warp branch from 01f6f82 to bf0011d Compare December 27, 2017 12:06
@gumb0 gumb0 merged commit 9551818 into develop Dec 27, 2017
@gumb0 gumb0 deleted the no-snapshot-no-warp branch December 27, 2017 13:43
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants