Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

json-rpc help command returns console formatted rather than json formatted results #8

Closed
dasher opened this issue Oct 25, 2012 · 1 comment

Comments

@dasher
Copy link

dasher commented Oct 25, 2012

Calling help via json-rpc returns a result with the output formatted for the command line rather than json formatted.

{ result: 'addmultisigaddress <nrequired> <\'["key","key"]\'> [account]\nbackupwallet <destination>\ndumpprivkey <litecoinaddress>\nencryptwallet <passphrase>\ngetaccount <litecoinaddress>\ngetaccountaddress <account>\ngetaddressesbyaccount <account>\ngetbalance [account] [minconf=1]\ngetblock <hash> [decompositions]\ngetblockcount\ngetblockhash <index>\ngetconnectioncount\ngetdifficulty\ngetgenerate\ngethashespersec\ngetinfo\ngetmemorypool [data]\ngetmininginfo\ngetnetworkhashps [blocks]\ngetnewaddress [account]\ngetpeerinfo\ngetrawmempool\ngetreceivedbyaccount <account> [minconf=1]\ngetreceivedbyaddress <litecoinaddress> [minconf=1]\ngettransaction <txid> [decompositions]\ngetwork [data]\ngetworkex [data, coinbase]\nhelp [command]\nimportprivkey <litecoinprivkey> [label]\nkeypoolrefill\nlistaccounts [minconf=1]\nlistreceivedbyaccount [minconf=1] [includeempty=false]\nlistreceivedbyaddress [minconf=1] [includeempty=false]\nlistsinceblock [blockhash] [target-confirmations]\nlisttransactions [account] [count=10] [from=0]\nmove <fromaccount> <toaccount> <amount> [minconf=1] [comment]\nsendfrom <fromaccount> <tolitecoinaddress> <amount> [minconf=1] [comment] [comment-to]\nsendmany <fromaccount> {address:amount,...} [minconf=1] [comment]\nsendrawtx <hex string>\nsendtoaddress <litecoinaddress> <amount> [comment] [comment-to]\nsetaccount <litecoinaddress> <account>\nsetgenerate <generate> [genproclimit]\nsetmininput <amount>\nsettxfee <amount>\nsignmessage <litecoinaddress> <message>\nstop\nvalidateaddress <litecoinaddress>\nverifymessage <litecoinaddress> <signature> <message>', error: null, id: 1351164023093 }

@wtogami
Copy link

wtogami commented Jun 16, 2013

Not changing things from Bitcoin. If this is still an issue in Bitcoin, file an issue there.

@wtogami wtogami closed this as completed Jun 16, 2013
thrasher- pushed a commit to thrasher-/litecoin that referenced this issue Feb 14, 2018
07947ff Merge litecoin-project#9: [tests] Fix BOOST_CHECK_THROW macro
ec849d9 [tests] Fix BOOST_CHECK_THROW macro
31bc9f5 Merge litecoin-project#8: Remove unused Homebrew workaround
fa04209 Remove HomeBrew workaround
a523e08 Merge litecoin-project#7: Declare single-argument (non-converting) constructors "explicit"
a9e53b3 Merge #4: Pull upstream
16a1f7f Merge #3: Pull upstream
daf1285 Merge pull request #2 from jgarzik/master
f32df99 Merge branch '2016_04_unicode' into bitcoin
280b191 Merge remote-tracking branch 'jgarzik/master' into bitcoin
2740c4f Merge branch '2015_11_escape_plan' into bitcoin

git-subtree-dir: src/univalue
git-subtree-split: 07947ff
thrasher- pushed a commit to thrasher-/litecoin that referenced this issue Aug 28, 2018
6f53edb Acquire cs_main before ATMP call in block_assemble bench (James O'Beirne)

Pull request description:

  Calling `bench_bitcoin` currently fails due to calling ATMP without acquiring cs_main first in the recently added block_assemble bench (bitcoin#13219).

  ```
  $ cat <(uname -a) <(gcc --version)

  Linux james 4.4.0-119-generic litecoin-project#143+jamesob SMP Mon Apr 16 21:47:24 EDT 2018 x86_64 x86_64 x86_64 GNU/Linux
  gcc (Ubuntu 5.4.0-6ubuntu1~16.04.9) 5.4.0 20160609

  $ ./src/bench/bench_bitcoin

  WARNING: This is a debug build - may result in slower benchmarks.
  # Benchmark, evals, iterations, total, min, max, median
  Assertion failed: lock cs_main not held in validation.cpp:566; locks held:
  [1]    19323 abort (core dumped)  ./src/bench/bench_bitcoin
  ```

  ```
  (gdb) bt
  #0  0x00007fbdc9cf5428 in __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:54
  #1  0x00007fbdc9cf702a in __GI_abort () at abort.c:89
  #2  0x0000555a19580dc5 in AssertLockHeldInternal (pszName=pszName@entry=0x555a19834549 "cs_main",
      pszFile=pszFile@entry=0x555a1988a001 "validation.cpp", nLine=nLine@entry=566, cs=cs@entry=0x555a19ba55c0 <cs_main>) at sync.cpp:157
  #3  0x0000555a194b395f in AcceptToMemoryPoolWorker (chainparams=..., pool=..., state=...,
      ptx=std::shared_ptr (count 1, weak 0) 0x555a1bb819b0, pfMissingInputs=pfMissingInputs@entry=0x0, nAcceptTime=1532964079,
      plTxnReplaced=0x0, bypass_limits=false, nAbsurdFee=@0x7ffcbc1719d8: 0, coins_to_uncache=std::vector of length 0, capacity 0,
      test_accept=false) at validation.cpp:566
  #4  0x0000555a194ba661 in AcceptToMemoryPoolWithTime (chainparams=..., pool=..., state=...,
      tx=std::shared_ptr (count 1, weak 0) 0x555a1bb819b0, pfMissingInputs=pfMissingInputs@entry=0x0, nAcceptTime=<optimized out>,
      plTxnReplaced=0x0, bypass_limits=false, nAbsurdFee=0, test_accept=false) at validation.cpp:998
  litecoin-project#5  0x0000555a194ba7ce in AcceptToMemoryPool (pool=..., state=..., tx=std::shared_ptr (count 1, weak 0) 0x555a1bb819b0,
      pfMissingInputs=pfMissingInputs@entry=0x0, plTxnReplaced=plTxnReplaced@entry=0x0, bypass_limits=bypass_limits@entry=false, nAbsurdFee=0,
      test_accept=false) at validation.cpp:1014
  litecoin-project#6  0x0000555a19363fbe in AssembleBlock (state=...) at bench/block_assemble.cpp:102
  litecoin-project#7  0x0000555a193654d3 in std::_Function_handler<void (benchmark::State&), void (*)(benchmark::State&)>::_M_invoke(std::_Any_data const&, benchmark::State&) (__functor=..., __args#0=...) at /usr/include/c++/5/functional:1871
  litecoin-project#8  0x0000555a193501d7 in std::function<void (benchmark::State&)>::operator()(benchmark::State&) const (this=this@entry=0x555a1ba2cda0,
      __args#0=...) at /usr/include/c++/5/functional:2267
  litecoin-project#9  0x0000555a1934ec4c in benchmark::BenchRunner::RunAll (printer=..., num_evals=5, scaling=<optimized out>, filter=..., is_list_only=false)
      at bench/bench.cpp:121
  litecoin-project#10 0x0000555a1934ade9 in main (argc=<optimized out>, argv=<optimized out>) at bench/bench_bitcoin.cpp:92
  ```

Tree-SHA512: fdd7b28ff123ccea7a4f334d53f735d0c0f94aa9cc52520c2dd34dca45d78c691af64efcd32366fc472fedffbd79591d2be2bb3bfc4a5186e8712b6b452d64e3
Lerzsta pushed a commit to Lerzsta/litecoin that referenced this issue Mar 27, 2023
digirayc referenced this issue in cyberyen/cyberyen Jun 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants