Well, in atoni's case it's not ignorance, it's FUD, because there are facts that 300+ accounts generate blocks, but he stubbornly posts it's two people controlling the network.
Here is the java code that can be used to calculate active (who have forged blocks) forgers in the NXT blockchain:
import java.sql.DriverManager;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Iterator;
public class inspectDB {
public static void runQuery(int startHeight, int endHeight) {
Connection conn = null;
String dbUrl = "jdbc:h2:nxt_db/nxt;DB_CLOSE_ON_EXIT=FALSE";
dbUrl += ";DB_CLOSE_ON_EXIT=FALSE";
try {
Class.forName("org.h2.Driver");
conn = DriverManager.getConnection(dbUrl, "sa", "sa");
Statement stmt = conn.createStatement();
// generator_public_key
ArrayList
String stmtStr = "SELECT generator_public_key, height, timestamp, total_amount FROM block where total_amount >= 0 and height > "
+ startHeight + " and height < " + endHeight;
ResultSet selectRS = stmt.executeQuery(stmtStr);// total_amount
while (selectRS.next()) {
String a = selectRS.getString(1);
pubgenkeys.add(a);
}
Iterator
HashMap
while (it.hasNext()) {
String cur = it.next();
// System.out.println(cur);
if (occ.containsKey(cur)) {
int last = occ.get(cur).intValue();
occ.remove(cur);
occ.put(cur, new Integer(last + 1));
} else
occ.put(cur, 1);
}
int numBlocks = endHeight - startHeight;
int numAddr = occ.values().size();
System.out.println("startBlock " + startHeight
+ " generated by # addresses : " + numAddr
+ " (numBlocks: " + numBlocks + ")");
conn.close();
} catch (SQLException e) {
e.printStackTrace();
} catch (ClassNotFoundException e) {
e.printStackTrace();
} finally {
if (conn != null)
try {
conn.close();
} catch (SQLException e) {
e.printStackTrace();
}
}
}
public static void main(String[] args) {
int maxh = 200000;
int step = 10000;
for (int bh = 0; bh < maxh; bh += step) {
runQuery(bh, bh + step);
}
}
}
He will likely come up with some excuse again, just like he came up with an excuse not to set up a NXT node to check the real number of nodes in the network.