 |
PRCYCoin
2.0.0.7rc1
P2P Digital Currency
|
Go to the documentation of this file.
38 LogPrintf(
"CreateCoinStake : cannot generate key image\n");
60 std::vector<valtype> vSolutions;
70 if (!
Solver(scriptPubKeyKernel, whichType, vSolutions)) {
71 LogPrintf(
"CreateCoinStake : failed to parse kernel\n");
88 scriptPubKey = scriptPubKeyKernel;
98 CTxOut out(0, scriptPubKey);
99 std::copy(txPub.
begin(), txPub.
end(), std::back_inserter(out.
txPub));
100 vout.emplace_back(out);
104 CKey myTxPrivStaking;
110 CTxOut outStaking(0, scriptPubKeyOutStaking);
111 std::copy(txPubStaking.
begin(), txPubStaking.
end(), std::back_inserter(outStaking.
txPub));
112 vout.emplace_back(outStaking);
123 int nStakeModifierHeight = 0;
124 int64_t nStakeModifierTime = 0;
127 return error(
"%s: failed to get index from", __func__);
130 return error(
"CheckStakeKernelHash(): failed to get kernel stake modifier \n");
An input of a transaction.
bool CreateTxIn(CWallet *pwallet, CTxIn &txIn, uint256 hashTxOut=0) override
std::vector< unsigned char > encryptionKey
CDataStream GetUniqueness() override
void MakeNewKey(bool fCompressed)
Generate a new private key using a cryptographic PRNG.
bool GetKernelStakeModifier(uint256 hashBlockFrom, uint64_t &nStakeModifier, int &nStakeModifierHeight, int64_t &nStakeModifierTime, bool fPrintProofOfStake)
std::string GetHex() const
CChain chainActive
The currently-connected chain of blocks.
CScript GetScriptForDestination(const CTxDestination &dest)
bool GetModifier(uint64_t &nStakeModifier) override
The basic transaction that is broadcasted on the network and contained in blocks.
bool GetTxFrom(CTransaction &tx) override
const unsigned char * begin() const
static bool ComputeStealthDestination(const CKey &secret, const CPubKey &pubViewKey, const CPubKey &pubSpendKey, CPubKey &des)
CBlockIndex * GetIndexFrom() override
An output of a transaction.
CAmount GetValue() override
bool GetTransaction(const uint256 &hash, CTransaction &tx, uint256 &hashBlock, bool fAllowSlow, CBlockIndex *blockIndex)
Return transaction in tx, and if it was found inside a block, its hash is placed in hashBlock.
std::vector< CTxOut > vout
bool mySpendPrivateKey(CKey &spend) const
const unsigned char * end() const
bool computeSharedSec(const CTransaction &tx, const CTxOut &out, CPubKey &sharedSec) const
const CWalletTx * GetWalletTx(const uint256 &hash) const
int64_t CAmount
Amount in PRCY (Can be negative)
256-bit unsigned big integer.
CPubKey GetPubKey() const
Compute the public key from a private key.
Serialized script, used inside transaction inputs and outputs.
bool generateKeyImage(const CPubKey &pub, CKeyImage &img) const
uint256 GetBlockHash() const
bool CreateTxOuts(CWallet *pwallet, std::vector< CTxOut > &vout, CAmount nTotal) override
160-bit unsigned big integer.
An encapsulated public key.
An encapsulated private key.
bool Solver(const CKeyStore &keystore, const CScript &scriptPubKey, uint256 hash, int nHashType, CScript &scriptSigRet, txnouttype &whichTypeRet)
Sign scriptPubKey with private keys stored in keystore, given transaction hash and hash type.
A CWallet is an extension of a keystore, which also maintains a set of transactions and balances,...
A transaction with a bunch of additional info that only the owner cares about.
bool Contains(const CBlockIndex *pindex) const
Efficiently check whether a block is present in this chain.
Double ended buffer combining vector and stream-like interfaces.
const uint256 & GetHash() const
bool SetInput(CTransaction txPrev, unsigned int n)
PRCY Stake.
The block chain is a tree shaped structure starting with the genesis block at the root,...
bool GetKey(const CKeyID &address, CKey &keyOut) const
GetKey implementation that can derive a HD private key on the fly.
CAmount getCTxOutValue(const CTransaction &tx, const CTxOut &out) const
bool error(const char *fmt, const Args &... args)
bool myViewPrivateKey(CKey &view) const
std::vector< unsigned char > txPub