-
Notifications
You must be signed in to change notification settings - Fork 0
/
cuberead_size.go
54 lines (45 loc) · 880 Bytes
/
cuberead_size.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
package main
import (
"fmt"
"os"
"strconv"
"encoding/gob"
"../config"
"../core"
)
var echo=fmt.Println
var Configure config.Configuration
func init() {
Configure=config.LoadConfiguration("../config/cubechain.conf")
core.Configure=Configure
core.CubenoSet()
echo (core.CubeSetNum)
gob.Register(&core.TxData{})
gob.Register(&core.TxBST{})
gob.Register(map[string]string{})
}
func main() {
ch:=core.CubeHeight()
ch2:=core.GetCubeHeight3()
echo(ch)
echo(ch2)
sstart:=os.Args[1]
send:=os.Args[2]
start,_:=strconv.Atoi(sstart)
end,_:=strconv.Atoi(send)
for cubeno:=start;cubeno<=end;cubeno++ {
var c core.Cube
c.Cubeno=cubeno
c.Read()
if c.FileSize()<5000.0 {
echo (cubeno)
echo (c.FileSize())
echo (c.FilePath())
c.DownloadingRpc3()
} else if c.CHash=="" {
echo (cubeno)
echo (c.FilePath())
c.DownloadingRpc3()
}
}
}