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:
Dave Collins 2014-05-03 12:19:40 -05:00
parent 3fd5904859
commit d0a2506a96

View file

@ -237,16 +237,17 @@ type Vout struct {
// GetMiningInfoResult models the data from the getmininginfo command.
type GetMiningInfoResult struct {
CurrentBlockSize float64 `json:"currentblocksize"`
Blocks int64 `json:"blocks"`
CurrentBlockSize uint64 `json:"currentblocksize"`
CurrentBlockTx uint64 `json:"currentblocktx"`
Difficulty float64 `json:"difficulty"`
Errors string `json:"errors"`
Generate bool `json:"generate"`
GenProcLimit float64 `json:"genproclimit"`
PooledTx float64 `json:"pooledtx"`
GenProcLimit int `json:"genproclimit"`
HashesPerSec int64 `json:"hashespersec"`
NetworkHashPS int64 `json:"networkhashps"`
PooledTx uint64 `json:"pooledtx"`
Testnet bool `json:"testnet"`
Blocks float64 `json:"blocks"`
CurrentBlockTx float64 `json:"currentblocktx"`
HashesPerSec float64 `json:"hashespersec"`
}
// GetWorkResult models the data from the getwork command.