Improve GetMiningInfoResult.
This commit modifies the types of the GetMiningInfoResult to better match their underlying types. While the information was all available and accurate, it's nicer to treat numeric values as proper types instead of all float64s. Also, a new networkhashps field has been added for compatibility with the reference implementation.
This commit is contained in:
parent
3fd5904859
commit
d0a2506a96
1 changed files with 7 additions and 6 deletions
|
@ -237,16 +237,17 @@ type Vout struct {
|
||||||
|
|
||||||
// GetMiningInfoResult models the data from the getmininginfo command.
|
// GetMiningInfoResult models the data from the getmininginfo command.
|
||||||
type GetMiningInfoResult struct {
|
type GetMiningInfoResult struct {
|
||||||
CurrentBlockSize float64 `json:"currentblocksize"`
|
Blocks int64 `json:"blocks"`
|
||||||
|
CurrentBlockSize uint64 `json:"currentblocksize"`
|
||||||
|
CurrentBlockTx uint64 `json:"currentblocktx"`
|
||||||
Difficulty float64 `json:"difficulty"`
|
Difficulty float64 `json:"difficulty"`
|
||||||
Errors string `json:"errors"`
|
Errors string `json:"errors"`
|
||||||
Generate bool `json:"generate"`
|
Generate bool `json:"generate"`
|
||||||
GenProcLimit float64 `json:"genproclimit"`
|
GenProcLimit int `json:"genproclimit"`
|
||||||
PooledTx float64 `json:"pooledtx"`
|
HashesPerSec int64 `json:"hashespersec"`
|
||||||
|
NetworkHashPS int64 `json:"networkhashps"`
|
||||||
|
PooledTx uint64 `json:"pooledtx"`
|
||||||
Testnet bool `json:"testnet"`
|
Testnet bool `json:"testnet"`
|
||||||
Blocks float64 `json:"blocks"`
|
|
||||||
CurrentBlockTx float64 `json:"currentblocktx"`
|
|
||||||
HashesPerSec float64 `json:"hashespersec"`
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// GetWorkResult models the data from the getwork command.
|
// GetWorkResult models the data from the getwork command.
|
||||||
|
|
Loading…
Reference in a new issue