File tree Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ package cgminer
2
2
3
3
import (
4
4
"fmt"
5
+ "math"
5
6
"strconv"
6
7
)
7
8
@@ -27,12 +28,12 @@ func (n Number) Float64() float64 {
27
28
28
29
// Int64 returns the number as an int64.
29
30
func (n Number ) Int64 () int64 {
30
- return int64 (n )
31
+ return int64 (n . Int () )
31
32
}
32
33
33
34
// Int returns the number as an int.
34
35
func (n Number ) Int () int {
35
- return int (n )
36
+ return int (math . Round ( float64 ( n )) )
36
37
}
37
38
38
39
func (n * Number ) UnmarshalJSON (b []byte ) error {
Original file line number Diff line number Diff line change @@ -736,7 +736,7 @@ type Devs struct {
736
736
// Pool - get working pools
737
737
type Pool struct {
738
738
Accepted int64
739
- BestShare int64 `json:"Best Share"`
739
+ BestShare Number `json:"Best Share"`
740
740
Diff1Shares int64 `json:"Diff1 Shares"`
741
741
DifficultyAccepted float64 `json:"Difficulty Accepted"`
742
742
DifficultyRejected float64 `json:"Difficulty Rejected"`
You can’t perform that action at this time.
0 commit comments