Initial bootstrap weight for betanet (#1179)

This commit is contained in:
cryptocode 2018-09-12 20:37:47 +02:00 committed by Roy Keene
commit 3a348d1b3f
4 changed files with 9 additions and 1 deletions

View file

@ -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()

View file

@ -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 <cstddef>\n"
"namespace rai {\n"

BIN
rep_weights_beta.bin Normal file

Binary file not shown.