Pack Coin more tightly
This commit is contained in:
parent
97072d6685
commit
41aa5b79a3
1 changed files with 8 additions and 8 deletions
16
src/coins.h
16
src/coins.h
|
@ -30,18 +30,18 @@
|
||||||
class Coin
|
class Coin
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
//! whether the containing transaction was a coinbase
|
|
||||||
bool fCoinBase;
|
|
||||||
|
|
||||||
//! unspent transaction output
|
//! unspent transaction output
|
||||||
CTxOut out;
|
CTxOut out;
|
||||||
|
|
||||||
//! at which height the containing transaction was included in the active block chain
|
//! whether containing transaction was a coinbase
|
||||||
uint32_t nHeight;
|
unsigned int fCoinBase : 1;
|
||||||
|
|
||||||
//! construct a Coin from a CTxOut and height/coinbase properties.
|
//! at which height this containing transaction was included in the active block chain
|
||||||
Coin(CTxOut&& outIn, int nHeightIn, bool fCoinBaseIn) : fCoinBase(fCoinBaseIn), out(std::move(outIn)), nHeight(nHeightIn) {}
|
uint32_t nHeight : 31;
|
||||||
Coin(const CTxOut& outIn, int nHeightIn, bool fCoinBaseIn) : fCoinBase(fCoinBaseIn), out(outIn), nHeight(nHeightIn) {}
|
|
||||||
|
//! construct a Coin from a CTxOut and height/coinbase information.
|
||||||
|
Coin(CTxOut&& outIn, int nHeightIn, bool fCoinBaseIn) : out(std::move(outIn)), fCoinBase(fCoinBaseIn), nHeight(nHeightIn) {}
|
||||||
|
Coin(const CTxOut& outIn, int nHeightIn, bool fCoinBaseIn) : out(outIn), fCoinBase(fCoinBaseIn),nHeight(nHeightIn) {}
|
||||||
|
|
||||||
void Clear() {
|
void Clear() {
|
||||||
out.SetNull();
|
out.SetNull();
|
||||||
|
|
Loading…
Reference in a new issue