From 2608b56dc05d2a298592cfeb316edfaa5dc65a53 Mon Sep 17 00:00:00 2001 From: David Schwartz Date: Wed, 24 Jul 2013 17:53:54 -0700 Subject: [PATCH] Fix write load. --- modules/ripple_app/node/ripple_NodeStore.cpp | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/modules/ripple_app/node/ripple_NodeStore.cpp b/modules/ripple_app/node/ripple_NodeStore.cpp index 61b05b9dd7..c490ceb4bf 100644 --- a/modules/ripple_app/node/ripple_NodeStore.cpp +++ b/modules/ripple_app/node/ripple_NodeStore.cpp @@ -177,13 +177,9 @@ void NodeStore::BatchWriter::writeBatch () return; } - // VFALCO NOTE On the first trip through, mWriteLoad will be 0. - // This is probably not intended. Perhaps the order - // of calls isn't quite right - // - mWriteLoad = std::max (setSize, static_cast (mWriteSet.size ())); - - setSize = set.size (); + int newSetSize = mWriteSet.size(); + mWriteLoad = std::max (setSize, newSetSize); + newSetSize = set.size (); } m_callback.writeBatch (set);