Changeset View
Changeset View
Standalone View
Standalone View
src/script/script.h
Show First 20 Lines • Show All 627 Lines • ▼ Show 20 Lines | public: | ||||
/** | /** | ||||
* Accurately count sigOps, including sigOps in pay-to-script-hash | * Accurately count sigOps, including sigOps in pay-to-script-hash | ||||
* transactions: | * transactions: | ||||
*/ | */ | ||||
uint32_t GetSigOpCount(uint32_t flags, const CScript &scriptSig) const; | uint32_t GetSigOpCount(uint32_t flags, const CScript &scriptSig) const; | ||||
bool IsPayToScriptHash() const; | bool IsPayToScriptHash() const; | ||||
bool IsCommitment(const std::vector<uint8_t> &data) const; | bool IsCommitment(const std::vector<uint8_t> &data) const; | ||||
bool IsWitnessProgram(int &version, std::vector<uint8_t> &program) const; | bool IsWitnessProgram() const; | ||||
deadalnix: I would highly advise to keep the code as this. If you want t a convenience function, use a… | |||||
florianAuthorUnsubmitted Done Inline ActionsOk, I'll create a wrapper. Would you like me to write a new test/*.cpp file to test it? Aren't the tests integrating ALLOW_SEGWIT_RECOVERY and IsWitnessProgram enough after I include the ones you asked? I believe the test cases for IsWitnessProgram alone would be close to those. florian: Ok, I'll create a wrapper.
Would you like me to write a new test/*.cpp file to test it? Aren't… | |||||
/** | /** | ||||
* Called by IsStandardTx and P2SH/BIP62 VerifyScript (which makes it | * Called by IsStandardTx and P2SH/BIP62 VerifyScript (which makes it | ||||
* consensus-critical). | * consensus-critical). | ||||
*/ | */ | ||||
bool IsPushOnly(const_iterator pc) const; | bool IsPushOnly(const_iterator pc) const; | ||||
bool IsPushOnly() const; | bool IsPushOnly() const; | ||||
Show All 26 Lines |
I would highly advise to keep the code as this. If you want t a convenience function, use a wrapper.
This also needs a unit test.