Changeset View
Changeset View
Standalone View
Standalone View
src/undo.h
Show First 20 Lines • Show All 66 Lines • ▼ Show 20 Lines | template <typename Stream> void Unserialize(Stream &s) { | ||||
*pcoin = Coin(std::move(txout), nHeight, fCoinBase); | *pcoin = Coin(std::move(txout), nHeight, fCoinBase); | ||||
} | } | ||||
}; | }; | ||||
static const size_t MAX_INPUTS_PER_TX = | static const size_t MAX_INPUTS_PER_TX = | ||||
MAX_TX_SIZE / ::GetSerializeSize(CTxIn(), SER_NETWORK, PROTOCOL_VERSION); | MAX_TX_SIZE / ::GetSerializeSize(CTxIn(), SER_NETWORK, PROTOCOL_VERSION); | ||||
static const size_t MAX_OUTPUTS_PER_TX = | |||||
MAX_TX_SIZE / ::GetSerializeSize(CTxOut(), SER_NETWORK, PROTOCOL_VERSION); | |||||
/** Restore the UTXO in a Coin at a given COutPoint */ | /** Restore the UTXO in a Coin at a given COutPoint */ | ||||
class CTxUndo { | class CTxUndo { | ||||
public: | public: | ||||
// Undo information for all txins | // Undo information for all txins | ||||
std::vector<Coin> vprevout; | std::vector<Coin> vprevout; | ||||
template <typename Stream> void Serialize(Stream &s) const { | template <typename Stream> void Serialize(Stream &s) const { | ||||
// TODO: avoid reimplementing vector serializer. | // TODO: avoid reimplementing vector serializer. | ||||
▲ Show 20 Lines • Show All 63 Lines • Show Last 20 Lines |