MCPcopy Create free account
hub / github.com/citp/BlockSci / filterInputsOnChain

Method filterInputsOnChain

test/blocksci/test_algorithms.cpp:37–49  ·  view source on GitHub ↗

Iterates over all inputs on the chain and returns them if boolFunc(input) returns true. */

Source from the content-addressed store, hash-verified

35 Iterates over all inputs on the chain and returns them if boolFunc(input) returns true.
36 */
37 std::vector<Input> filterInputsOnChain(std::function<bool (Input)> boolFunc) {
38 std::vector<Input> ins;
39 for(auto block : chain) {
40 for(auto tx : block) {
41 for(auto input : tx.inputs()) {
42 if(boolFunc(input)) {
43 ins.push_back(input);
44 }
45 }
46 }
47 }
48 return ins;
49 }
50};
51
52

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected