MetacoSA / NBitcoin

Comprehensive Bitcoin library for the .NET framework.
MIT License
1.87k stars 845 forks source link

Add getblockstats to RPCClient #1042

Closed bezysoftware closed 3 years ago

bezysoftware commented 3 years ago

Resolves #1029

NicolasDorier commented 3 years ago

Thanks, can you add one test? This help to spot when code break because of breaking change in new release of nodes.

bezysoftware commented 3 years ago

Thanks, can you add one test? This help to spot when code break because of breaking change in new release of nodes.

Can you help me with the setup of the test? When I try to call the method I get "Can't read undo data from disk" error. I tried running "bitcoin-qt" as described in the RPCClientTests.cs file but I get the same error.

NicolasDorier commented 3 years ago

@bezysoftware just look at all the RPC tests that already exists in NBitcoin and do the same (example CanGetBlockFromRPC)

bezysoftware commented 3 years ago

@NicolasDorier turns out I cannot run the getblockstats on the genesis block but must generate at least one extra, the above error was a result of the RPC call PR updated