Skip to content

Commit 67fbc38

Browse files
committed
fmt
1 parent 02756bc commit 67fbc38

File tree

10 files changed

+41
-28
lines changed

10 files changed

+41
-28
lines changed

backend/block.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,13 @@ package backend
1919
import (
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

3031
func (fs *ChainDB) Blocks() []*types.Block {

backend/chaindb.go

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,20 +18,22 @@ package backend
1818

1919
import (
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

3739
type ChainDB struct {

backend/file.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,12 @@ package backend
1818

1919
import (
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

2829
func (fs *ChainDB) Files() []*types.FileInfo {

backend/torrent.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,13 @@ package backend
1818

1919
import (
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

2830
func (fs *ChainDB) Torrents() map[string]uint64 {

backend/tree.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,16 +18,17 @@ package backend
1818

1919
import (
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

3334
func (fs *ChainDB) Leaves() []merkletree.Content {

cmd/robot/main.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,9 @@ import (
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

1415
func main() {

model_srv.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,13 @@ package robot
1919
import (
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

3031
func (m *Monitor) parseFileMeta(tx *types.Transaction, meta *types.FileMeta, b *types.Block) error {

monitor.go

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,22 +19,24 @@ package robot
1919
import (
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.

rpc.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,14 @@ package robot
1818

1919
import (
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.

service.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,15 @@ package robot
1919
import (
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

0 commit comments

Comments
 (0)