0

I created a testnet environment, successfully created the genesis block, however don't see it reflected in the wallet-cli with the correct genesis wallet.

Is there perhaps a unlock time on the genesis block?

unlock time (varint, height, 60 here)
3c

I loaded up a little test blockexplorer and checked that the genesis block was created successfully.

W. Kadou
  • 125
  • 8

1 Answers1

1

i had the same problem. The thing is that the wallet does not process the genesis coinbase tx.

To process it, edit the src/wallet/wallet2.cpp after line #2131.

add

if ((m_blockchain.size() == 1) && (start_height == 0)) { cryptonote::block genesis; generate_genesis(genesis); if (m_blockchain[0] == get_block_hash(genesis)) { LOG_PRINT_L2("Processing genesis transaction: " << string_tools::pod_to_hex(get_transaction_hash(genesis.miner_tx))); std::vector o_indices_genesis = {0}; //genesis transaction output process_new_transaction(get_transaction_hash(genesis.miner_tx), genesis.miner_tx, o_indices_genesis, 0, genesis.timestamp, true, false, false, {}); } else { LOG_ERROR("Skip processing of genesis transaction, genesis block hash does not match: " << string_tools::pod_to_hex(get_block_hash(genesis))); } }

reference : gist.github.com/atanmarko/63815fc18a936d8a985a37e64d84b06d

make sure the one-time pub key at the genesis-hex-tx is well generated. if it is so , with this code you should see the reward on your wallet.

if it not so see

Monero Genesis transaction & nonce - clarification

hope this helps you

jszwako
  • 23
  • 6