MCPcopy Create free account
hub / github.com/ElementsProject/elements / generatetoaddress

Function generatetoaddress

src/test/util/mining.cpp:22–29  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

20using node::NodeContext;
21
22CTxIn generatetoaddress(const NodeContext& node, const std::string& address)
23{
24 const auto dest = DecodeDestination(address);
25 assert(IsValidDestination(dest));
26 const auto coinbase_script = GetScriptForDestination(dest);
27
28 return MineBlock(node, coinbase_script);
29}
30
31std::vector<std::shared_ptr<CBlock>> CreateBlockChain(size_t total_height, const CChainParams& params)
32{

Callers

nothing calls this directly

Calls 4

DecodeDestinationFunction · 0.85
IsValidDestinationFunction · 0.85
GetScriptForDestinationFunction · 0.85
MineBlockFunction · 0.85

Tested by

no test coverage detected