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

Function readStdin

src/bitcoin-tx.cpp:817–833  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

815}
816
817static std::string readStdin()
818{
819 char buf[4096];
820 std::string ret;
821
822 while (!feof(stdin)) {
823 size_t bread = fread(buf, 1, sizeof(buf), stdin);
824 ret.append(buf, bread);
825 if (bread < sizeof(buf))
826 break;
827 }
828
829 if (ferror(stdin))
830 throw std::runtime_error("error reading stdin");
831
832 return TrimString(ret);
833}
834
835static int CommandLineRawTx(int argc, char* argv[])
836{

Callers 1

CommandLineRawTxFunction · 0.85

Calls 1

TrimStringFunction · 0.85

Tested by

no test coverage detected