This would allow us to fail to use breaking Core versions.
https://github.com/zkSNACKs/WalletWasabi/issues/3037#issuecomment-581153303
$ bitcoin-cli getnetworkinfo | jq .version
190001
Additionally, here's a trick I use to look for changed APIs between releases so that I can document them; I think this could also help you identify breaking changes.
## On the old version of Bitcoin Core
bitcoin-cli help | grep '^[a-z]' | cut -f1 -d' ' | xargs -i bitcoin-cli help '{}' > old-rpc-docs.txt
## On the new version of Bitcoin Core (or master, or whatever)
bitcoin-cli help | grep '^[a-z]' | cut -f1 -d' ' | xargs -i bitcoin-cli help '{}' > new-rpc-docs.txt
diff -u old-rpc-docs.txt new-rpc-docs.txt | colordiff | less -R
This tells you about any differences in the built-in RPC documentation, and that documentation should always be updated to reflect changes in the RPC behavior in the same PR that makes the behavior change (though sometimes this is missed; if so, it's a bug).
Thank you, this is great!
New specification of the issue.
getnetworkinfo's version. (And implement it if NBitcoin doesn't have it.) @jmacato can you do this? It would be beneficial for you to start learning about non-UI things, too. It's easy btw, if you want we can do it in a pair programming manner.@nopara73 I'd like to take a shot at this after #3024 :D
@jmacato, NBitcoin RPCClient class contains a ScanRPCCapabilitiesAsync method that makes a couple of rpc calls against the Bitcoin node in order to learn what that node supports and what it does not. ScanRPCCapabilitiesAsync method returns a RPCCapabilities instances which contains the Version property so:
c#
var capabilities = await global.BitcoinCoreNode.RpcClient.ScanRPCCapabilitiesAsync();
var nodeVersion= capabilities.Version;
Most helpful comment
Additionally, here's a trick I use to look for changed APIs between releases so that I can document them; I think this could also help you identify breaking changes.
This tells you about any differences in the built-in RPC documentation, and that documentation should always be updated to reflect changes in the RPC behavior in the same PR that makes the behavior change (though sometimes this is missed; if so, it's a bug).