Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit eefb411

Browse files
Update README
1 parent 7f23949 commit eefb411

File tree

1 file changed

+21
-16
lines changed

1 file changed

+21
-16
lines changed

README

Lines changed: 21 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -133,28 +133,33 @@ Example:
133133

134134
== Fifth step. Genesis block ==
135135

136-
Now your coin code is almost ready. You need to generate the coinbase transaction for your genesis block. Uncomment the following code in "generate_genesis_block(block& bl)" function in src/cryptonote_core/cryptonote_format_utils.cpp:
136+
1. Build the binaries with blank genesis tx hex (src/cryptonote_config.h)
137137

138-
/*
139-
account_public_address ac = boost::value_initialized<account_public_address>();
140-
std::vector<size_t> sz;
141-
construct_miner_tx(0, 0, 0, 0, 0, ac, bl.miner_tx); // zero fee in genesis
142-
blobdata txb = tx_to_blob(bl.miner_tx);
143-
std::string hex_tx_represent = string_tools::buff_to_hex_nodelimer(txb);
144-
std::cout << "Genesis block hex: " << hex_tx_represent << std::endl;
145-
*/
138+
You should leave #define GENESIS_COINBASE_TX_HEX blank and compile the binaries without it.
146139

147-
Compile and run the daemon. As soon as it prints line starting with "Genesis coinbase tx hex: " copy the hex representation of the coinbase tx and paste it into generate_genesis_block function:
140+
Example:
141+
#define GENESIS_COINBASE_TX_HEX ""
142+
143+
144+
2. Start the daemon to print out the genesis block
148145

149-
Genesis coinbase tx hex: 013c01ff0001ffffffffffff0f029b2e4c0281c0b02e7c53291a94d1d0cbff8883f8024f5142ee494ffbbd08807121012cfb466857c5762cdd97e242b08b7e239ab35807f5024d4785a33d9ebdba68b0
146+
Run your daemon with --print-genesis-tx argument. It will print out the genesis block coinbase transaction hash.
147+
148+
Example:
149+
cryptonotecoind --print-genesis-tx
150150

151-
->
152151

153-
std::string genesis_coinbase_tx_hex = "013c01ff0001ffffffffffff0f029b2e4c0281c0b02e7c53291a94d1d0cbff8883f8024f5142ee494ffbbd08807121012cfb466857c5762cdd97e242b08b7e239ab35807f5024d4785a33d9ebdba68b0";
152+
3. Copy the printed transaction hash — (src/cryptonote_config.h)
153+
154+
Copy the tx hash that has been printed by the daemon to GENESIS_COINBASE_TX_HEX in /src/cryptonote_config.h
155+
156+
Example:
157+
#define GENESIS_COINBASE_TX_HEX "013c01ff0001ffff...785a33d9ebdba68b0"
158+
154159

155-
Comment the coinbase tx generation code back and recompile everything again.
160+
4. Recompile the binaries
156161

157-
You coin code is ready now. Make an announcement for the potential users and enjoy!
162+
Recompile everything again. Your coin code is ready now. Make an announcement for the potential users and enjoy!
158163

159164

160165
== Building CryptoNote ==
@@ -182,7 +187,7 @@ http://www.microsoft.com/
182187
http://www.cmake.org/
183188
http://www.boost.org/
184189

185-
To build, change to a directory where this file is located, and run this commands:
190+
To build, change to a directory where this file is located, and run theas commands:
186191
mkdir build
187192
cd build
188193
cmake -G "Visual Studio 11 Win64" ..

0 commit comments

Comments
 (0)