Changeset View
Changeset View
Standalone View
Standalone View
src/script/interpreter.cpp
Show First 20 Lines • Show All 1,338 Lines • ▼ Show 20 Lines | |||||
namespace { | namespace { | ||||
/** | /** | ||||
* Wrapper that serializes like CTransaction, but with the modifications | * Wrapper that serializes like CTransaction, but with the modifications | ||||
* required for the signature hash done in-place | * required for the signature hash done in-place | ||||
*/ | */ | ||||
template <class T> class CTransactionSignatureSerializer { | template <class T> class CTransactionSignatureSerializer { | ||||
private: | private: | ||||
//!< reference to the spending transaction (the one being serialized) | //! reference to the spending transaction (the one being serialized) | ||||
const T &txTo; | const T &txTo; | ||||
//!< output script being consumed | //! output script being consumed | ||||
const CScript &scriptCode; | const CScript &scriptCode; | ||||
//!< input index of txTo being signed | //! input index of txTo being signed | ||||
const unsigned int nIn; | const unsigned int nIn; | ||||
//!< container for hashtype flags | //! container for hashtype flags | ||||
const SigHashType sigHashType; | const SigHashType sigHashType; | ||||
public: | public: | ||||
CTransactionSignatureSerializer(const T &txToIn, | CTransactionSignatureSerializer(const T &txToIn, | ||||
const CScript &scriptCodeIn, | const CScript &scriptCodeIn, | ||||
unsigned int nInIn, | unsigned int nInIn, | ||||
SigHashType sigHashTypeIn) | SigHashType sigHashTypeIn) | ||||
: txTo(txToIn), scriptCode(scriptCodeIn), nIn(nInIn), | : txTo(txToIn), scriptCode(scriptCodeIn), nIn(nInIn), | ||||
▲ Show 20 Lines • Show All 476 Lines • Show Last 20 Lines |