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

Function readStdin

src/bitcoin-tx.cpp:777–793  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

775}
776
777static std::string readStdin()
778{
779 char buf[4096];
780 std::string ret;
781
782 while (!feof(stdin)) {
783 size_t bread = fread(buf, 1, sizeof(buf), stdin);
784 ret.append(buf, bread);
785 if (bread < sizeof(buf))
786 break;
787 }
788
789 if (ferror(stdin))
790 throw std::runtime_error("error reading stdin");
791
792 return TrimString(ret);
793}
794
795static int CommandLineRawTx(int argc, char* argv[])
796{

Callers 1

CommandLineRawTxFunction · 0.85

Calls 1

TrimStringFunction · 0.85

Tested by

no test coverage detected