Bitcoin Forum
June 21, 2024, 02:40:11 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: command line: bitcoin-cli verifychain  (Read 111 times)
22bits (OP)
Member
**
Offline Offline

Activity: 85
Merit: 25


View Profile
May 24, 2024, 05:00:44 AM
 #1

Running on Ubuntu not sure how to pass parameters to the bitcoin-cli -verifychain command.  Works fine with curl or programmatic interface, but not sure how to just type it in at the prompt and have it work. 
Code:
$bitcoin-cli verifychain <how do I put parameters here?>
I see it takes two parameters which I would like to pass in on the command line.
nc50lc
Legendary
*
Offline Offline

Activity: 2450
Merit: 5724


Self-proclaimed Genius


View Profile
May 24, 2024, 05:37:52 AM
Merited by 22bits (2), ABCbits (1)
 #2

AFAIK it should just take the two positional arg's numeric values right after the command, each separated by whitespace.

You can also try to use --named arg and specify the command parameters' names.

Like for example:
$bitcoin-cli --named verifychain checklevel=1 nblocks=0

█▀▀▀











█▄▄▄
▀▀▀▀▀▀▀▀▀▀▀
e
▄▄▄▄▄▄▄▄▄▄▄
█████████████
████████████▄███
██▐███████▄█████▀
█████████▄████▀
███▐████▄███▀
████▐██████▀
█████▀█████
███████████▄
████████████▄
██▄█████▀█████▄
▄█████████▀█████▀
███████████▀██▀
████▀█████████
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
c.h.
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀█











▄▄▄█
▄██████▄▄▄
█████████████▄▄
███████████████
███████████████
███████████████
███████████████
███░░█████████
███▌▐█████████
█████████████
███████████▀
██████████▀
████████▀
▀██▀▀
22bits (OP)
Member
**
Offline Offline

Activity: 85
Merit: 25


View Profile
May 24, 2024, 10:33:39 AM
 #3

OK that works great.  When I run the verifychain with any parameter it always returns true, except when nblocks=0 which specifies it should read all blocks.  When nblocks=0 it always returns false.  Also larger numbers return false.  Would it be some kind of timeout issue?
22bits (OP)
Member
**
Offline Offline

Activity: 85
Merit: 25


View Profile
May 24, 2024, 12:40:12 PM
 #4

I am trying to track this down.  getblockchaininfo looks good.   verifychain with higher block counts returns false with error: null.  Not really sure what the cause might be.  sample run for 4, 500.
response follows:
Code:
{"result":false,"error":null,"id":2}

nc50lc
Legendary
*
Offline Offline

Activity: 2450
Merit: 5724


Self-proclaimed Genius


View Profile
May 25, 2024, 05:10:47 AM
 #5

Check you recent 'debug.log' entries for more detailed result. (located in bitcoin datadir)

The lines related to verifychain command should start from "Verifying last <N> blocks at level <N>" line to "Verification: <message>" result.
The "nBlocks" and "verification level" should match the command that returned that 'error: null' response.

█▀▀▀











█▄▄▄
▀▀▀▀▀▀▀▀▀▀▀
e
▄▄▄▄▄▄▄▄▄▄▄
█████████████
████████████▄███
██▐███████▄█████▀
█████████▄████▀
███▐████▄███▀
████▐██████▀
█████▀█████
███████████▄
████████████▄
██▄█████▀█████▄
▄█████████▀█████▀
███████████▀██▀
████▀█████████
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
c.h.
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀█











▄▄▄█
▄██████▄▄▄
█████████████▄▄
███████████████
███████████████
███████████████
███████████████
███░░█████████
███▌▐█████████
█████████████
███████████▀
██████████▀
████████▀
▀██▀▀
22bits (OP)
Member
**
Offline Offline

Activity: 85
Merit: 25


View Profile
May 29, 2024, 02:23:42 PM
 #6

Thank you, found the pertinent info in the debug.log. 
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!