Cleanup the 'PeerSet' hierarchy:

This commit introduces no functional changes but cleans up the
code and shrinks the surface area by removing dead and unused
code, leveraging std:: alternatives to hand-rolled code and
improving comments and documentation.
This commit is contained in:
John Freeman
2020-04-23 15:06:52 -05:00
committed by Nik Bougalis
parent d025f3fb28
commit 5b5226d518
25 changed files with 358 additions and 571 deletions

View File

@@ -454,7 +454,7 @@ DatabaseShardImp::fetchLedger(uint256 const& hash, std::uint32_t seq)
};
auto ledger{std::make_shared<Ledger>(
InboundLedger::deserializeHeader(makeSlice(nObj->getData()), true),
deserializePrefixedHeader(makeSlice(nObj->getData())),
app_.config(),
*app_.shardFamily())};
@@ -1238,7 +1238,7 @@ DatabaseShardImp::finalizeShard(
PublicKey const& publicKey{app_.nodeIdentity().first};
message.set_nodepubkey(publicKey.data(), publicKey.size());
message.set_shardindexes(std::to_string(shardIndex));
app_.overlay().foreach (send_always(std::make_shared<Message>(
app_.overlay().foreach(send_always(std::make_shared<Message>(
message, protocol::mtPEER_SHARD_INFO)));
}
});