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
1919import (
2020 "encoding/json"
2121 "fmt"
22- "github.com/CortexFoundation/CortexTheseus/log"
23- "github.com/CortexFoundation/torrentfs/types"
24- bolt "go.etcd.io/bbolt"
2522 "sort"
2623 "strconv"
2724 "time"
25+
26+ "github.com/CortexFoundation/CortexTheseus/log"
27+ "github.com/CortexFoundation/torrentfs/types"
28+ bolt "go.etcd.io/bbolt"
2829)
2930
3031func (fs * ChainDB ) Blocks () []* types.Block {
Original file line number Diff line number Diff line change @@ -18,20 +18,22 @@ package backend
1818
1919import (
2020 "encoding/binary"
21+ "os"
22+ "path/filepath"
23+ "strconv"
24+ "sync"
25+ "sync/atomic"
26+ "time"
27+
2128 "github.com/CortexFoundation/merkletree"
2229 "github.com/CortexFoundation/torrentfs/params"
2330 "github.com/CortexFoundation/torrentfs/types"
24- "sync"
25- "sync/atomic"
31+
2632 //lru "github.com/hashicorp/golang-lru"
2733 "github.com/CortexFoundation/CortexTheseus/common"
2834 "github.com/CortexFoundation/CortexTheseus/log"
2935 "github.com/google/uuid"
3036 bolt "go.etcd.io/bbolt"
31- "os"
32- "path/filepath"
33- "strconv"
34- "time"
3537)
3638
3739type ChainDB struct {
Original file line number Diff line number Diff line change @@ -18,11 +18,12 @@ package backend
1818
1919import (
2020 "encoding/json"
21+ "time"
22+
2123 "github.com/CortexFoundation/CortexTheseus/common"
2224 "github.com/CortexFoundation/CortexTheseus/log"
2325 "github.com/CortexFoundation/torrentfs/types"
2426 bolt "go.etcd.io/bbolt"
25- "time"
2627)
2728
2829func (fs * ChainDB ) Files () []* types.FileInfo {
Original file line number Diff line number Diff line change @@ -18,11 +18,13 @@ package backend
1818
1919import (
2020 "errors"
21+ "strconv"
2122 "strings"
23+
2224 //lru "github.com/hashicorp/golang-lru"
25+
2326 "github.com/CortexFoundation/CortexTheseus/log"
2427 bolt "go.etcd.io/bbolt"
25- "strconv"
2628)
2729
2830func (fs * ChainDB ) Torrents () map [string ]uint64 {
Original file line number Diff line number Diff line change @@ -18,16 +18,17 @@ package backend
1818
1919import (
2020 "errors"
21+ "sort"
22+ "strconv"
23+ "time"
24+
2125 "github.com/CortexFoundation/CortexTheseus/common"
2226 "github.com/CortexFoundation/CortexTheseus/common/hexutil"
2327 "github.com/CortexFoundation/CortexTheseus/log"
2428 "github.com/CortexFoundation/merkletree"
2529 "github.com/CortexFoundation/torrentfs/params"
2630 "github.com/CortexFoundation/torrentfs/types"
2731 bolt "go.etcd.io/bbolt"
28- "sort"
29- "strconv"
30- "time"
3132)
3233
3334func (fs * ChainDB ) Leaves () []merkletree.Content {
Original file line number Diff line number Diff line change 77 "time"
88
99 "github.com/CortexFoundation/CortexTheseus/log"
10- "github.com/CortexFoundation/robot"
1110 "github.com/CortexFoundation/torrentfs/params"
11+
12+ "github.com/CortexFoundation/robot"
1213)
1314
1415func main () {
Original file line number Diff line number Diff line change @@ -19,12 +19,13 @@ package robot
1919import (
2020 "context"
2121 "errors"
22+ "time"
23+
2224 "github.com/CortexFoundation/CortexTheseus/common"
2325 "github.com/CortexFoundation/CortexTheseus/common/mclock"
2426 "github.com/CortexFoundation/CortexTheseus/log"
2527 "github.com/CortexFoundation/torrentfs/params"
2628 "github.com/CortexFoundation/torrentfs/types"
27- "time"
2829)
2930
3031func (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
1919import (
2020 "context"
2121 "errors"
22+ "math"
23+ "path/filepath"
24+ "runtime"
25+ "sync"
26+ "sync/atomic"
27+ "time"
28+
2229 "github.com/CortexFoundation/CortexTheseus/common"
2330 "github.com/CortexFoundation/CortexTheseus/common/mclock"
2431 "github.com/CortexFoundation/CortexTheseus/log"
2532 "github.com/CortexFoundation/CortexTheseus/rpc"
26- "github.com/CortexFoundation/robot/backend"
2733 "github.com/CortexFoundation/torrentfs/params"
2834 "github.com/CortexFoundation/torrentfs/types"
2935 lru "github.com/hashicorp/golang-lru/v2"
3036 ttl "github.com/hashicorp/golang-lru/v2/expirable"
3137 "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"
3840)
3941
4042// 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
1818
1919import (
2020 "errors"
21+ "strconv"
22+ "time"
23+
2124 "github.com/CortexFoundation/CortexTheseus/common/hexutil"
2225 "github.com/CortexFoundation/CortexTheseus/log"
2326 "github.com/CortexFoundation/CortexTheseus/rpc"
2427 "github.com/CortexFoundation/torrentfs/params"
2528 "github.com/CortexFoundation/torrentfs/types"
26- "strconv"
27- "time"
2829)
2930
3031// 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
1919import (
2020 "encoding/json"
2121 "errors"
22+ "math/big"
23+ "strconv"
24+ "time"
25+
2226 "github.com/CortexFoundation/CortexTheseus/common"
2327 "github.com/CortexFoundation/CortexTheseus/common/mclock"
2428 "github.com/CortexFoundation/CortexTheseus/log"
2529 params1 "github.com/CortexFoundation/CortexTheseus/params"
2630 "github.com/CortexFoundation/torrentfs/types"
27- "math/big"
28- "strconv"
29- "time"
3031)
3132
3233// solve block from node
You can’t perform that action at this time.
0 commit comments