diff --git a/ci/record_rep_weights.py b/ci/record_rep_weights.py index 996b262b..b465cbb3 100644 --- a/ci/record_rep_weights.py +++ b/ci/record_rep_weights.py @@ -55,9 +55,11 @@ with open(args.output, 'wb') as of: of.write(weight_bytes) total += rep["weight"] count += 1 + print rep["account"] + ": " + str(rep["weight"]) if total >= supplymax: break print "wrote %d rep weights" % count + print "max supply %d" % supplymax of.close() diff --git a/rai/secure/CMakeLists.txt b/rai/secure/CMakeLists.txt index 03daa65c..38f4385c 100644 --- a/rai/secure/CMakeLists.txt +++ b/rai/secure/CMakeLists.txt @@ -11,7 +11,13 @@ else () endif () # Embed bootstrap representative weights in executable -file (READ ${CMAKE_SOURCE_DIR}/rep_weights.bin filedata HEX) +if (${ACTIVE_NETWORK} MATCHES "rai_beta_network") + set (REP_WEIGHTS_BIN_NAME "rep_weights_beta.bin") +else () + set (REP_WEIGHTS_BIN_NAME "rep_weights_live.bin") +endif () + +file (READ ${CMAKE_SOURCE_DIR}/${REP_WEIGHTS_BIN_NAME} filedata HEX) string (REGEX REPLACE "(..)" "0x\\1," filedata ${filedata}) file (WRITE ${CMAKE_BINARY_DIR}/bootstrap_weights.cpp "#include \n" "namespace rai {\n" diff --git a/rep_weights_beta.bin b/rep_weights_beta.bin new file mode 100644 index 00000000..19d856bf Binary files /dev/null and b/rep_weights_beta.bin differ diff --git a/rep_weights.bin b/rep_weights_live.bin similarity index 100% rename from rep_weights.bin rename to rep_weights_live.bin