I was exploring the function static CBlock CreateGenesisBlock
inside src/chainparams.cpp
and I was looking at the way Satoshi created its scriptSig:
txNew.vin[0].scriptSig = CScript() << 486604799 << CScriptNum(4) << std::vector<unsigned char>((const unsigned char*)pszTimestamp, (const unsigned char*)pszTimestamp + strlen(pszTimestamp));
CScript
is constructing an object of the CScript class with the following inputs:
486604799
is the Nonce
CScriptNum(4)
is an extraNonce
pszTimestamp
is just a string "The Times 03/Jan/2009 Chancellor on brink of second bailout for banks";
Why is the scriptSig
formatted like this and shouldn't the scriptSig
contain the signature of the whole transaction (not just little parts of it) and a public key of the person who signs the transaction?