aboutsummaryrefslogtreecommitdiff
path: root/src/script/script.h
diff options
context:
space:
mode:
authorPieter Wuille <pieter.wuille@gmail.com>2018-04-04 09:02:24 -0700
committerPieter Wuille <pieter.wuille@gmail.com>2018-04-13 09:07:27 -0700
commit6a7456ad6072f405e8b02bffa0fb4e9f0cfe71e0 (patch)
tree90162c46919ee3d6ce683f5ff575fec5f917e5ae /src/script/script.h
parent33a8ecfbce9c108f0a945dcce479e87c8a2714dc (diff)
downloadbitcoin-6a7456ad6072f405e8b02bffa0fb4e9f0cfe71e0.tar.xz
[MOVEONLY] Move CSCript::FindAndDelete to interpreter
Diffstat (limited to 'src/script/script.h')
-rw-r--r--src/script/script.h28
1 files changed, 0 insertions, 28 deletions
diff --git a/src/script/script.h b/src/script/script.h
index 00fd469fa1..c06e320a1a 100644
--- a/src/script/script.h
+++ b/src/script/script.h
@@ -571,34 +571,6 @@ public:
return (opcodetype)(OP_1+n-1);
}
- int FindAndDelete(const CScript& b)
- {
- int nFound = 0;
- if (b.empty())
- return nFound;
- CScript result;
- const_iterator pc = begin(), pc2 = begin(), end = this->end();
- opcodetype opcode;
- do
- {
- result.insert(result.end(), pc2, pc);
- while (static_cast<size_t>(end - pc) >= b.size() && std::equal(b.begin(), b.end(), pc))
- {
- pc = pc + b.size();
- ++nFound;
- }
- pc2 = pc;
- }
- while (GetOp(pc, opcode));
-
- if (nFound > 0) {
- result.insert(result.end(), pc2, end);
- *this = result;
- }
-
- return nFound;
- }
-
/**
* Pre-version-0.6, Bitcoin always counted CHECKMULTISIGs
* as 20 sigops. With pay-to-script-hash, that changed: