Mined 03 January 2009 at 6:15 PM GMT
Genesis block message by Satoshi
Display the genesis block message by Satoshi.
// Create genesis block.
bc::chain::block block = bc::chain::block::genesis_mainnet();
// Genesis block contains a single coinbase transaction.
assert(block.transactions().size() == 1);
// Get first transaction in block (coinbase).
const bc::chain::transaction& coinbase_tx = block.transactions();
// Coinbase tx has a single input.
assert(coinbase_tx.inputs().size() == 1);
const bc::chain::input& coinbase_input = coinbase_tx.inputs();
// Convert the input script to its raw format.
const auto prefix = false;
const bc::data_chunk& raw_message = coinbase_input.script().to_data(prefix);
// Convert this to a std::string.
std::string message(raw_message.begin(), raw_message.end());
// Display the genesis block message.
std::cout << message << std::endl;
Shared with 💚 by Free Spirit
✌ & 💚
- Happy Children’s Day
- Bitcoin is Freedom…Bitcoin can serve as a first line of defense for freedom — a nonviolent tool which can disincentivize violence and control. It is not only a hedge against currency devaluation, but a hedge … Continue reading Bitcoin is Freedom…
- Your Silence…Silence is the absence of ambient audible sound, the emission of sounds of such low intensity that they do not draw attention to themselves, or the state of having ceased to produce sounds; this latter sense can … Continue reading Your Silence…
- Best Pool RulesBest Pool Rules In my opinion, more or less in order: 1) Lowest fees 1a) Shares transaction fees 1b) Any pool that does NOT share transaction fees should be rejected from consideration (which, … Continue reading Best Pool Rules
- The Great Resetthe great reset