MCPcopy Create free account
hub / github.com/BTCGPU/BTCGPU / FindAndDelete

Function FindAndDelete

test/functional/test_framework/script.py:576–591  ·  view source on GitHub ↗

Consensus critical, see FindAndDelete() in Satoshi codebase

(script, sig)

Source from the content-addressed store, hash-verified

574FORKID_BTG = 79 # Atomic number AU
575
576def FindAndDelete(script, sig):
577 """Consensus critical, see FindAndDelete() in Satoshi codebase"""
578 r = b''
579 last_sop_idx = sop_idx = 0
580 skip = True
581 for (opcode, data, sop_idx) in script.raw_iter():
582 if not skip:
583 r += script[last_sop_idx:sop_idx]
584 last_sop_idx = sop_idx
585 if script[sop_idx:sop_idx + len(sig)] == sig:
586 skip = True
587 else:
588 skip = False
589 if not skip:
590 r += script[last_sop_idx:]
591 return CScript(r)
592
593
594def SignatureHash(script, txTo, inIdx, hashtype):

Callers 1

SignatureHashFunction · 0.70

Calls 2

raw_iterMethod · 0.80
CScriptClass · 0.70

Tested by

no test coverage detected