 |
PRCYCoin
2.0.0.7rc1
P2P Digital Currency
|
Go to the documentation of this file.
18 TxInputStream(
int nTypeIn,
int nVersionIn,
const unsigned char *txTo,
size_t txToLen) :
20 m_version(nVersionIn),
25 TxInputStream& read(
char* pch,
size_t nSize)
27 if (nSize > m_remaining)
28 throw std::ios_base::failure(std::string(__func__) +
": end of data");
31 throw std::ios_base::failure(std::string(__func__) +
": bad destination buffer");
34 throw std::ios_base::failure(std::string(__func__) +
": bad source buffer");
36 memcpy(pch, m_data, nSize);
52 const unsigned char* m_data;
66 const unsigned char *txTo ,
unsigned int txToLen,
70 TxInputStream stream(
SER_NETWORK, PROTOCOL_VERSION, txTo, txToLen);
73 if (nIn >= tx.vin.size())
75 if (tx.GetSerializeSize(
SER_NETWORK, PROTOCOL_VERSION) != txToLen)
82 }
catch (
const std::exception&) {
@ bitcoinconsensus_ERR_TX_INDEX
#define BITCOINCONSENSUS_API_VER
const CBigNum operator>>(const CBigNum &a, unsigned int shift)
@ bitcoinconsensus_ERR_OK
void * memcpy(void *a, const void *b, size_t c)
void Unserialize(Stream &s, char &a, int, int=0)
The basic transaction that is broadcasted on the network and contained in blocks.
unsigned int bitcoinconsensus_version()
int bitcoinconsensus_verify_script(const unsigned char *scriptPubKey, unsigned int scriptPubKeyLen, const unsigned char *txTo, unsigned int txToLen, unsigned int nIn, unsigned int flags, bitcoinconsensus_error *err)
Returns 1 if the input nIn of the serialized transaction pointed to by txTo correctly spends the scri...
Serialized script, used inside transaction inputs and outputs.
@ bitcoinconsensus_ERR_TX_DESERIALIZE
@ bitcoinconsensus_ERR_TX_SIZE_MISMATCH
bool VerifyScript(const CScript &scriptSig, const CScript &scriptPubKey, unsigned int flags, const BaseSignatureChecker &checker, ScriptError *serror)
enum bitcoinconsensus_error_t bitcoinconsensus_error