File tree Expand file tree Collapse file tree 10 files changed +41
-28
lines changed Expand file tree Collapse file tree 10 files changed +41
-28
lines changed Original file line number Diff line number Diff line change @@ -19,12 +19,13 @@ package backend
19
19
import (
20
20
"encoding/json"
21
21
"fmt"
22
- "github.com/CortexFoundation/CortexTheseus/log"
23
- "github.com/CortexFoundation/torrentfs/types"
24
- bolt "go.etcd.io/bbolt"
25
22
"sort"
26
23
"strconv"
27
24
"time"
25
+
26
+ "github.com/CortexFoundation/CortexTheseus/log"
27
+ "github.com/CortexFoundation/torrentfs/types"
28
+ bolt "go.etcd.io/bbolt"
28
29
)
29
30
30
31
func (fs * ChainDB ) Blocks () []* types.Block {
Original file line number Diff line number Diff line change @@ -18,20 +18,22 @@ package backend
18
18
19
19
import (
20
20
"encoding/binary"
21
+ "os"
22
+ "path/filepath"
23
+ "strconv"
24
+ "sync"
25
+ "sync/atomic"
26
+ "time"
27
+
21
28
"github.com/CortexFoundation/merkletree"
22
29
"github.com/CortexFoundation/torrentfs/params"
23
30
"github.com/CortexFoundation/torrentfs/types"
24
- "sync"
25
- "sync/atomic"
31
+
26
32
//lru "github.com/hashicorp/golang-lru"
27
33
"github.com/CortexFoundation/CortexTheseus/common"
28
34
"github.com/CortexFoundation/CortexTheseus/log"
29
35
"github.com/google/uuid"
30
36
bolt "go.etcd.io/bbolt"
31
- "os"
32
- "path/filepath"
33
- "strconv"
34
- "time"
35
37
)
36
38
37
39
type ChainDB struct {
Original file line number Diff line number Diff line change @@ -18,11 +18,12 @@ package backend
18
18
19
19
import (
20
20
"encoding/json"
21
+ "time"
22
+
21
23
"github.com/CortexFoundation/CortexTheseus/common"
22
24
"github.com/CortexFoundation/CortexTheseus/log"
23
25
"github.com/CortexFoundation/torrentfs/types"
24
26
bolt "go.etcd.io/bbolt"
25
- "time"
26
27
)
27
28
28
29
func (fs * ChainDB ) Files () []* types.FileInfo {
Original file line number Diff line number Diff line change @@ -18,11 +18,13 @@ package backend
18
18
19
19
import (
20
20
"errors"
21
+ "strconv"
21
22
"strings"
23
+
22
24
//lru "github.com/hashicorp/golang-lru"
25
+
23
26
"github.com/CortexFoundation/CortexTheseus/log"
24
27
bolt "go.etcd.io/bbolt"
25
- "strconv"
26
28
)
27
29
28
30
func (fs * ChainDB ) Torrents () map [string ]uint64 {
Original file line number Diff line number Diff line change @@ -18,16 +18,17 @@ package backend
18
18
19
19
import (
20
20
"errors"
21
+ "sort"
22
+ "strconv"
23
+ "time"
24
+
21
25
"github.com/CortexFoundation/CortexTheseus/common"
22
26
"github.com/CortexFoundation/CortexTheseus/common/hexutil"
23
27
"github.com/CortexFoundation/CortexTheseus/log"
24
28
"github.com/CortexFoundation/merkletree"
25
29
"github.com/CortexFoundation/torrentfs/params"
26
30
"github.com/CortexFoundation/torrentfs/types"
27
31
bolt "go.etcd.io/bbolt"
28
- "sort"
29
- "strconv"
30
- "time"
31
32
)
32
33
33
34
func (fs * ChainDB ) Leaves () []merkletree.Content {
Original file line number Diff line number Diff line change 7
7
"time"
8
8
9
9
"github.com/CortexFoundation/CortexTheseus/log"
10
- "github.com/CortexFoundation/robot"
11
10
"github.com/CortexFoundation/torrentfs/params"
11
+
12
+ "github.com/CortexFoundation/robot"
12
13
)
13
14
14
15
func main () {
Original file line number Diff line number Diff line change @@ -19,12 +19,13 @@ package robot
19
19
import (
20
20
"context"
21
21
"errors"
22
+ "time"
23
+
22
24
"github.com/CortexFoundation/CortexTheseus/common"
23
25
"github.com/CortexFoundation/CortexTheseus/common/mclock"
24
26
"github.com/CortexFoundation/CortexTheseus/log"
25
27
"github.com/CortexFoundation/torrentfs/params"
26
28
"github.com/CortexFoundation/torrentfs/types"
27
- "time"
28
29
)
29
30
30
31
func (m * Monitor ) parseFileMeta (tx * types.Transaction , meta * types.FileMeta , b * types.Block ) error {
Original file line number Diff line number Diff line change @@ -19,22 +19,24 @@ package robot
19
19
import (
20
20
"context"
21
21
"errors"
22
+ "math"
23
+ "path/filepath"
24
+ "runtime"
25
+ "sync"
26
+ "sync/atomic"
27
+ "time"
28
+
22
29
"github.com/CortexFoundation/CortexTheseus/common"
23
30
"github.com/CortexFoundation/CortexTheseus/common/mclock"
24
31
"github.com/CortexFoundation/CortexTheseus/log"
25
32
"github.com/CortexFoundation/CortexTheseus/rpc"
26
- "github.com/CortexFoundation/robot/backend"
27
33
"github.com/CortexFoundation/torrentfs/params"
28
34
"github.com/CortexFoundation/torrentfs/types"
29
35
lru "github.com/hashicorp/golang-lru/v2"
30
36
ttl "github.com/hashicorp/golang-lru/v2/expirable"
31
37
"github.com/ucwong/golang-kv"
32
- "math"
33
- "path/filepath"
34
- "runtime"
35
- "sync"
36
- "sync/atomic"
37
- "time"
38
+
39
+ "github.com/CortexFoundation/robot/backend"
38
40
)
39
41
40
42
// Monitor observes the data changes on the blockchain and synchronizes.
Original file line number Diff line number Diff line change @@ -18,13 +18,14 @@ package robot
18
18
19
19
import (
20
20
"errors"
21
+ "strconv"
22
+ "time"
23
+
21
24
"github.com/CortexFoundation/CortexTheseus/common/hexutil"
22
25
"github.com/CortexFoundation/CortexTheseus/log"
23
26
"github.com/CortexFoundation/CortexTheseus/rpc"
24
27
"github.com/CortexFoundation/torrentfs/params"
25
28
"github.com/CortexFoundation/torrentfs/types"
26
- "strconv"
27
- "time"
28
29
)
29
30
30
31
// SetConnection method builds connection to remote or local communicator.
Original file line number Diff line number Diff line change @@ -19,14 +19,15 @@ package robot
19
19
import (
20
20
"encoding/json"
21
21
"errors"
22
+ "math/big"
23
+ "strconv"
24
+ "time"
25
+
22
26
"github.com/CortexFoundation/CortexTheseus/common"
23
27
"github.com/CortexFoundation/CortexTheseus/common/mclock"
24
28
"github.com/CortexFoundation/CortexTheseus/log"
25
29
params1 "github.com/CortexFoundation/CortexTheseus/params"
26
30
"github.com/CortexFoundation/torrentfs/types"
27
- "math/big"
28
- "strconv"
29
- "time"
30
31
)
31
32
32
33
// solve block from node
You can’t perform that action at this time.
0 commit comments