Skip to content

Commit

Permalink
fixes #170
Browse files Browse the repository at this point in the history
Add exception and warning about 64-bit jvm.
  • Loading branch information
fireduck64 committed Jan 24, 2020
1 parent 7117933 commit 26be18b
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions node/src/SnowBlossomNode.java
Expand Up @@ -23,6 +23,7 @@
import snowblossom.lib.trie.HashedTrie;
import snowblossom.lib.trie.TrieDBMap;
import snowblossom.proto.WalletDatabase;
import snowblossom.lib.SystemUtil;

public class SnowBlossomNode
{
Expand Down Expand Up @@ -211,6 +212,14 @@ private void loadDB()

if(db_type.equals("rocksdb"))
{
if (!SystemUtil.isJvm64Bit())
{
logger.log(Level.SEVERE,"Java Virtual Machine is 32-bit. rocksdb does not work with 32-bit jvm.");
logger.log(Level.SEVERE,"Upgrade to 64-bit JVM or set db_type=lobstack");

throw new RuntimeException("Needs 64-bit JVM for rocksdb");

}
db = new DB(config, new JRocksDB(config));
}
else if (db_type.equals("lobstack"))
Expand Down

0 comments on commit 26be18b

Please sign in to comment.