Currently, the getblockchainfo RPC implementation directly returns the internal threshold state strings defined in blockchain. This is not ideal since it means that any changes to the internal implementation could inadvertently change the RPC results without being noticed. It also means that consumers of the RPC have to import the blockchain module solely to access those constants. Not only does that mean an extremely heavy dependency is required just to access those constants, the module is eventually going to be removed in favor of making the blockchain package an internal package meaning clients will no longer have access to it. Consequently, this updates the getblockchaininfo RPC implementation to decouple the agenda status strings by converting the internal blockchain threshold state to use the new agenda status string constants defined in the rpc/jsonrpc/types module. |
||
|---|---|---|
| .. | ||
| testdata | ||
| doc.go | ||
| interface.go | ||
| log.go | ||
| README.md | ||
| rpcserver_test.go | ||
| rpcserver.go | ||
| rpcserverhandlers_test.go | ||
| rpcserverhelp_test.go | ||
| rpcserverhelp.go | ||
| rpcwebsocket.go | ||
| treasury_test.go | ||