mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +00:00
Cleanups to the sha map node format code.
This commit is contained in:
@@ -1007,13 +1007,13 @@ void Peer::recvGetLedger(newcoin::TMGetLedger& packet)
|
||||
reply.add_nodes()->set_nodedata(nData.getDataPtr(), nData.getLength());
|
||||
|
||||
if (packet.nodeids().size() != 0)
|
||||
{
|
||||
{ // new-style root request
|
||||
Log(lsINFO) << "Ledger root w/map roots request";
|
||||
SHAMap::pointer map = ledger->peekAccountStateMap();
|
||||
if (map)
|
||||
{
|
||||
{ // return account state root node if possible
|
||||
Serializer rootNode(768);
|
||||
if (map->getRootNode(rootNode, STN_ARF_WIRE))
|
||||
if (map->getRootNode(rootNode, snfWIRE))
|
||||
{
|
||||
reply.add_nodes()->set_nodedata(rootNode.getDataPtr(), rootNode.getLength());
|
||||
if (ledger->getTransHash().isNonZero())
|
||||
@@ -1022,7 +1022,7 @@ void Peer::recvGetLedger(newcoin::TMGetLedger& packet)
|
||||
if (map)
|
||||
{
|
||||
rootNode.resize(0);
|
||||
if (map->getRootNode(rootNode, STN_ARF_WIRE))
|
||||
if (map->getRootNode(rootNode, snfWIRE))
|
||||
reply.add_nodes()->set_nodedata(rootNode.getDataPtr(), rootNode.getLength());
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user