CA: Add skeletal CAssetGeneration class illustrating fields

This commit is contained in:
Mark Friedenbach 2016-11-07 15:31:40 -05:00 committed by Gregory Sanders
parent 2d1fdab4fa
commit 427a8c2bca

View file

@ -327,6 +327,28 @@ public:
}
};
class CAssetGeneration
{
public:
// This is a 32-byte nonce of no consensus-defined meaning,
// but is used as additional entropy to the asset tag calculation.
// This is used by higher-layer protocols for defining the
// Ricardian contract governing the asset.
uint256 hashNonce;
// Both explicit and blinded issuance amounts are supported
// (see class definition for CTxOutValue for details).
CTxOutValue nAmount;
// If nonzero, specifies the number of asset issuance and/or
// de-issuance tokens to generate. These tokens are made available
// to the outputs of the generating transaction.
CAmount nInflationKeys;
CAmount nDeflationKeys;
public:
// FIXME: constructor and methods
};
struct CMutableTransaction;
@ -478,6 +500,14 @@ public:
const int32_t nVersion;
const CAmount nTxFee;
const std::vector<CTxIn> vin;
// The bitfield specifies which inputs of the transaction are used
// as entropy sources for generation of the fixed asset tag and any
// capability tokens. This is followed by a vector of CAssetGeneration
// objects equal to the number of set bits in the bitfield.
std::vector<bool> vAssetGenerationBits;
std::vector<CAssetGeneration> vAssetGenerations;
const std::vector<CTxOut> vout;
const uint32_t nLockTime;