MCPcopy Create free account
hub / github.com/bitcoin/bitcoin / transform_process_message_target

Function transform_process_message_target

test/fuzz/test_runner.py:204–220  ·  view source on GitHub ↗

Add a target per process message, and also keep ("process_message", {}) to allow for cross-pollination, or unlimited search

(targets, src_dir)

Source from the content-addressed store, hash-verified

202
203
204def transform_process_message_target(targets, src_dir):
205 """Add a target per process message, and also keep ("process_message", {}) to allow for
206 cross-pollination, or unlimited search"""
207
208 p2p_msg_target = "process_message"
209 if (p2p_msg_target, {}) in targets:
210 lines = subprocess.run(
211 ["git", "grep", "--function-context", "ALL_NET_MESSAGE_TYPES{", "src/protocol.h"],
212 check=True,
213 stdout=subprocess.PIPE,
214 text=True,
215 cwd=src_dir,
216 ).stdout.splitlines()
217 lines = [l.split("::", 1)[1].split(",")[0].lower() for l in lines if l.startswith("src/protocol.h- NetMsgType::")]
218 assert len(lines)
219 targets += [(p2p_msg_target, {"LIMIT_TO_MESSAGE_TYPE": m}) for m in lines]
220 return targets
221
222
223def transform_rpc_target(targets, src_dir):

Callers 1

generate_corpusFunction · 0.85

Calls 1

runMethod · 0.45

Tested by

no test coverage detected