MCPcopy Create free account
hub / github.com/BTCGPU/BTCGPU / JSONPrettyPrint

Function JSONPrettyPrint

src/test/script_tests.cpp:542–552  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

540};
541
542std::string JSONPrettyPrint(const UniValue& univalue)
543{
544 std::string ret = univalue.write(4);
545 // Workaround for libunivalue pretty printer, which puts a space between commas and newlines
546 size_t pos = 0;
547 while ((pos = ret.find(" \n", pos)) != std::string::npos) {
548 ret.replace(pos, 2, "\n");
549 pos++;
550 }
551 return ret;
552}
553
554void add_replay_tests_mode(std::vector<TestBuilder>& tests, const KeyData& keys, ReplayMode REPLAY_ITEM) {
555 tests.push_back(TestBuilder(CScript() << ToByteVector(keys.pubkey0) << OP_CHECKSIG,

Callers 1

BOOST_AUTO_TEST_CASEFunction · 0.85

Calls 2

writeMethod · 0.45
findMethod · 0.45

Tested by

no test coverage detected