v29.4-roots.1 · Commit 3: [PATCH 03/13] policy: restore conservative relay and network controls
src/script/script.h
Before: src/script/script.h · After: src/script/script.h
File metadata
index f4579849803beda9230965b2768a38d33b494ccd..3a26dfc9eb5b7045721cd15136d285cb980e4cac 100644
Download original patch · Release notes
Diff rows 1–18 of 18. Line numbers refer to the original before/after files.
+ Added− RemovedUnmarked lines are context.
Scroll the code area horizontally to read long lines. Before is on the left; after is on the right. Unified view fits narrow screens more easily.
src/script/script.h
CHANGED
|
@@ -410,6 +410,8 @@ typedef prevector<28, unsigned char> CScriptBase;
|
|
| 410 |
|
| 411 |
bool GetScriptOp(CScriptBase::const_iterator& pc, CScriptBase::const_iterator end, opcodetype& opcodeRet, std::vector<unsigned char>* pvchRet);
|
| 412 |
|
|
|
|
|
|
|
| 413 |
/** Serialized script, used inside transaction inputs and outputs */
|
| 414 |
class CScript : public CScriptBase
|
| 415 |
{
|
|
@@ -573,6 +575,10 @@ public:
|
|
| 573 |
return (size() > 0 && *begin() == OP_RETURN) || (size() > MAX_SCRIPT_SIZE);
|
| 574 |
}
|
| 575 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 576 |
void clear()
|
| 577 |
{
|
| 578 |
// The default prevector::clear() does not release memory
|
|
|
|
| 410 |
|
| 411 |
bool GetScriptOp(CScriptBase::const_iterator& pc, CScriptBase::const_iterator end, opcodetype& opcodeRet, std::vector<unsigned char>* pvchRet);
|
| 412 |
|
| 413 |
+
struct CScriptWitness;
|
| 414 |
+
|
| 415 |
/** Serialized script, used inside transaction inputs and outputs */
|
| 416 |
class CScript : public CScriptBase
|
| 417 |
{
|
|
|
|
| 575 |
return (size() > 0 && *begin() == OP_RETURN) || (size() > MAX_SCRIPT_SIZE);
|
| 576 |
}
|
| 577 |
|
| 578 |
+
size_t OPNetWitnessSize(const CScriptWitness& witness) const;
|
| 579 |
+
size_t IsOLGA(size_t remaining_outputs) const;
|
| 580 |
+
std::pair<size_t, size_t> DatacarrierBytes(size_t remaining_outputs, const CScriptWitness* witness = nullptr) const;
|
| 581 |
+
|
| 582 |
void clear()
|
| 583 |
{
|
| 584 |
// The default prevector::clear() does not release memory
|