Mined 03 January 2009 at 6:15 PM GMT


Genesis block message by Satoshi
/*
Display the genesis block message by Satoshi.
*/
#include <iostream>
#include <bitcoin/bitcoin.hpp>
int main()
{
// 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()[0];
// Coinbase tx has a single input.
assert(coinbase_tx.inputs().size() == 1);
const bc::chain::input& coinbase_input = coinbase_tx.inputs()[0];
// 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;
return 0;
}
Shared with 💚 by Free Spirit
✌ & 💚
- International payment using the radio wavesIn a first, Bitcoin developers have done something amazing amid the criticism over the lightning network and issues associated with it. A team of developers has made an international payment using the radio … Continue reading International payment using the radio waves
- Happy New Year !!!!Happy New Year!May the coming year be full of grand adventures , peace, prosperity and opportunities.Dream big and make the most of 2024!
- Discipline QuotesMy inspiration for this page was given to me by my new aquired friend, a fellow Truth Seeker – Joris and to whom I dedicate this page… Wish you… as well as to … Continue reading Discipline Quotes
- Merry Christmass and A Happpy New Year to allTo all my readers from the bottom of my heart I wish you Happy Holiday among family and friends, a jolly Merry Christmas and a Happy New Year and may 2024 bring you … Continue reading Merry Christmass and A Happpy New Year to all
- Bitcoin White Paper turn 15Bitcoin white paper turns 15 and the Legacy of Satoshi Nakamoto lives on. “I’ve been working on a new electronic cash system that’s fully peer-to-peer, with no trusted third party,” Satoshi Oct. 31, … Continue reading Bitcoin White Paper turn 15
