MCPcopy Create free account
hub / github.com/Bitcoin-ABC/bitcoin-abc / CheckTransactionSignatureEncodingImpl

Function CheckTransactionSignatureEncodingImpl

src/script/sigencoding.cpp:236–252  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

234
235template <typename F>
236static bool CheckTransactionSignatureEncodingImpl(const valtype &vchSig,
237 uint32_t flags,
238 ScriptError *serror, F fun) {
239 // Empty signature. Not strictly DER encoded, but allowed to provide a
240 // compact way to provide an invalid signature for use with CHECK(MULTI)SIG
241 if (vchSig.size() == 0) {
242 return true;
243 }
244
245 if (!fun(vchSig | boost::adaptors::sliced(0, vchSig.size() - 1), flags,
246 serror)) {
247 // serror is set
248 return false;
249 }
250
251 return CheckSighashEncoding(vchSig, flags, serror);
252}
253
254bool CheckTransactionSignatureEncoding(const valtype &vchSig, uint32_t flags,
255 ScriptError *serror) {

Calls 2

CheckSighashEncodingFunction · 0.85
sizeMethod · 0.45

Tested by

no test coverage detected