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

Function mining_create_block_template

test/functional/test_framework/ipc_util.py:112–117  ·  view source on GitHub ↗

Call mining.createNewBlock() and return template, then call template.destroy() when stack exits.

(mining, stack, ctx, *args, **kwargs)

Source from the content-addressed store, hash-verified

110
111
112async def mining_create_block_template(mining, stack, ctx, *args, **kwargs):
113 """Call mining.createNewBlock() and return template, then call template.destroy() when stack exits."""
114 response = await mining.createNewBlock(ctx, *args, **kwargs)
115 if not response._has("result"):
116 return None
117 return await stack.enter_async_context(destroying(response.result, ctx))
118
119
120async def mining_wait_next_template(template, stack, ctx, opts):

Callers 1

async_routineMethod · 0.90

Calls 2

destroyingFunction · 0.85
createNewBlockMethod · 0.80

Tested by

no test coverage detected