diff --git a/libethereum/BlockChainSync.cpp b/libethereum/BlockChainSync.cpp index 817bc8fc9..ba961e15c 100644 --- a/libethereum/BlockChainSync.cpp +++ b/libethereum/BlockChainSync.cpp @@ -68,9 +68,7 @@ DownloadMan& BlockChainSync::downloadMan() void BlockChainSync::abortSync() { - DEV_INVARIANT_CHECK; downloadMan().resetToChain(h256s()); - DEV_INVARIANT_CHECK; } void BlockChainSync::onPeerStatus(std::shared_ptr _peer) diff --git a/libp2p/Capability.cpp b/libp2p/Capability.cpp index 2b8e6be63..23d66302b 100644 --- a/libp2p/Capability.cpp +++ b/libp2p/Capability.cpp @@ -28,7 +28,7 @@ using namespace std; using namespace dev; using namespace dev::p2p; -Capability::Capability(std::shared_ptr _s, HostCapabilityFace* _h, unsigned _idOffset): m_session(_s), m_hostCap(_h), m_idOffset(_idOffset) +Capability::Capability(std::shared_ptr _s, HostCapabilityFace* _h, unsigned _idOffset): m_session(std::weak_ptr(_s)), m_hostCap(_h), m_idOffset(_idOffset) { clog(NetConnect) << "New session for capability" << m_hostCap->name() << "; idOffset:" << m_idOffset; }