diff --git a/CellframeNodeDiagtool/AbstractDiagnostic.cpp b/CellframeNodeDiagtool/AbstractDiagnostic.cpp index 763bc0c78f5acde0c1cfc73f4fddea7948ef916a..6d9e40676fab1d91c7c78a9b503ad942a3218887 100644 --- a/CellframeNodeDiagtool/AbstractDiagnostic.cpp +++ b/CellframeNodeDiagtool/AbstractDiagnostic.cpp @@ -302,11 +302,11 @@ QJsonObject AbstractDiagnostic::get_mempool_count(QString net) { QProcess proc; proc.start(QString(CLI_PATH), - QStringList()<<"mempool_list"<<"-net"<<QString(net)); + QStringList()<<"mempool"<<"count"<<"-net"<<QString(net)); proc.waitForFinished(5000); QString result = proc.readAll(); - - QRegularExpression rx(R"(\.*total: .*\.(.*): (\d+))"); + + QRegularExpression rx(R"(name: (.*)\n.*count: (\d+))"); QJsonObject resultObj; @@ -314,6 +314,7 @@ QJsonObject AbstractDiagnostic::get_mempool_count(QString net) while (matchItr.hasNext()) { + QRegularExpressionMatch match = matchItr.next(); resultObj.insert(match.captured(1), match.captured(2)); }