Page MenuHomePhabricator

Revert "save ScriptExecutionMetrics during CScriptCheck"
Changes PlannedPublic

Authored by markblundeberg on Jan 25 2020, 04:16.

Details

Reviewers
deadalnix
Group Reviewers
Restricted Project
Maniphest Tasks
T704: sigChecks implementation
Summary

This reverts commit 8bbb45003d06f41292afa9dd8a2b1f78a7b741c5 (D4920)

It looks like the plan is to not have CScriptChecks be a closure nor
to use the ScriptExecutionMetrics value in validation.cpp (another
class will be used), so this just needlessly consumes memory.

Test Plan

ninja check

Diff Detail

Repository
rABC Bitcoin ABC
Branch
revrev
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 9135
Build 16228: Default Diff Build & Tests
Build 16227: arc lint + arc unit

Event Timeline

src/validation.cpp
1191

I don't see how you can get away with passing a metric object down here. You will have to extract that number.

markblundeberg added inline comments.
src/validation.cpp
1191

argh, somehow I am randomly missing these comments and only seeing them later.

Yeah we can keep it this way for now. What I really want is to make CScriptCheck not store the value of error / metrics, and instead have a second bool operator()(&errorOut, &metricsOut). The plain version would just not output these.

Then CScriptCheck would just store the input parameters of the closure, and not the outputs.

Anyway, can be done later.