Skip to content

Commit

Permalink
Fix ledger sequence on copynode
Browse files Browse the repository at this point in the history
  • Loading branch information
miguelportilla authored and manojsdoshi committed Nov 18, 2020
1 parent 8707c15 commit ef53197
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
3 changes: 1 addition & 2 deletions src/ripple/app/misc/SHAMapStoreImp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -304,8 +304,7 @@ SHAMapStoreImp::copyNode(
SHAMapAbstractNode const& node)
{
// Copy a single record from node to dbRotating_
dbRotating_->fetchNodeObject(
node.getNodeHash().as_uint256(), node.getSeq());
dbRotating_->fetchNodeObject(node.getNodeHash().as_uint256());
if (!(++nodeCount % checkHealthInterval_))
{
if (health())
Expand Down
2 changes: 1 addition & 1 deletion src/ripple/app/misc/SHAMapStoreImp.h
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ class SHAMapStoreImp : public SHAMapStore

for (auto const& key : cache.getKeys())
{
dbRotating_->fetchNodeObject(key, 0);
dbRotating_->fetchNodeObject(key);
if (!(++check % checkHealthInterval_) && health())
return true;
}
Expand Down
5 changes: 3 additions & 2 deletions src/ripple/nodestore/Database.h
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ class Database : public Stoppable
std::shared_ptr<NodeObject>
fetchNodeObject(
uint256 const& hash,
std::uint32_t ledgerSeq,
std::uint32_t ledgerSeq = 0,
FetchType fetchType = FetchType::synchronous);

/** Fetch an object without waiting.
Expand All @@ -139,7 +139,8 @@ class Database : public Stoppable
@note This can be called concurrently.
@param hash The key of the object to retrieve
@param ledgerSeq The sequence of the ledger where the object is stored.
@param ledgerSeq The sequence of the ledger where the
object is stored, used by the shard store.
@param nodeObject The object retrieved
@return Whether the operation completed
*/
Expand Down

0 comments on commit ef53197

Please sign in to comment.