Skip to content

Commit

Permalink
fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
ucwong committed Feb 27, 2024
1 parent 02756bc commit 67fbc38
Show file tree
Hide file tree
Showing 10 changed files with 41 additions and 28 deletions.
7 changes: 4 additions & 3 deletions backend/block.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,13 @@ package backend
import (
"encoding/json"
"fmt"
"github.com/CortexFoundation/CortexTheseus/log"
"github.com/CortexFoundation/torrentfs/types"
bolt "go.etcd.io/bbolt"
"sort"
"strconv"
"time"

"github.com/CortexFoundation/CortexTheseus/log"
"github.com/CortexFoundation/torrentfs/types"
bolt "go.etcd.io/bbolt"
)

func (fs *ChainDB) Blocks() []*types.Block {
Expand Down
14 changes: 8 additions & 6 deletions backend/chaindb.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,20 +18,22 @@ package backend

import (
"encoding/binary"
"os"
"path/filepath"
"strconv"
"sync"
"sync/atomic"
"time"

"github.com/CortexFoundation/merkletree"
"github.com/CortexFoundation/torrentfs/params"
"github.com/CortexFoundation/torrentfs/types"
"sync"
"sync/atomic"

//lru "github.com/hashicorp/golang-lru"
"github.com/CortexFoundation/CortexTheseus/common"
"github.com/CortexFoundation/CortexTheseus/log"
"github.com/google/uuid"
bolt "go.etcd.io/bbolt"
"os"
"path/filepath"
"strconv"
"time"
)

type ChainDB struct {
Expand Down
3 changes: 2 additions & 1 deletion backend/file.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,12 @@ package backend

import (
"encoding/json"
"time"

"github.com/CortexFoundation/CortexTheseus/common"
"github.com/CortexFoundation/CortexTheseus/log"
"github.com/CortexFoundation/torrentfs/types"
bolt "go.etcd.io/bbolt"
"time"
)

func (fs *ChainDB) Files() []*types.FileInfo {
Expand Down
4 changes: 3 additions & 1 deletion backend/torrent.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,13 @@ package backend

import (
"errors"
"strconv"
"strings"

//lru "github.com/hashicorp/golang-lru"

"github.com/CortexFoundation/CortexTheseus/log"
bolt "go.etcd.io/bbolt"
"strconv"
)

func (fs *ChainDB) Torrents() map[string]uint64 {
Expand Down
7 changes: 4 additions & 3 deletions backend/tree.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,17 @@ package backend

import (
"errors"
"sort"
"strconv"
"time"

"github.com/CortexFoundation/CortexTheseus/common"
"github.com/CortexFoundation/CortexTheseus/common/hexutil"
"github.com/CortexFoundation/CortexTheseus/log"
"github.com/CortexFoundation/merkletree"
"github.com/CortexFoundation/torrentfs/params"
"github.com/CortexFoundation/torrentfs/types"
bolt "go.etcd.io/bbolt"
"sort"
"strconv"
"time"
)

func (fs *ChainDB) Leaves() []merkletree.Content {
Expand Down
3 changes: 2 additions & 1 deletion cmd/robot/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,9 @@ import (
"time"

"github.com/CortexFoundation/CortexTheseus/log"
"github.com/CortexFoundation/robot"
"github.com/CortexFoundation/torrentfs/params"

"github.com/CortexFoundation/robot"
)

func main() {
Expand Down
3 changes: 2 additions & 1 deletion model_srv.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,13 @@ package robot
import (
"context"
"errors"
"time"

"github.com/CortexFoundation/CortexTheseus/common"
"github.com/CortexFoundation/CortexTheseus/common/mclock"
"github.com/CortexFoundation/CortexTheseus/log"
"github.com/CortexFoundation/torrentfs/params"
"github.com/CortexFoundation/torrentfs/types"
"time"
)

func (m *Monitor) parseFileMeta(tx *types.Transaction, meta *types.FileMeta, b *types.Block) error {
Expand Down
16 changes: 9 additions & 7 deletions monitor.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,22 +19,24 @@ package robot
import (
"context"
"errors"
"math"
"path/filepath"
"runtime"
"sync"
"sync/atomic"
"time"

"github.com/CortexFoundation/CortexTheseus/common"
"github.com/CortexFoundation/CortexTheseus/common/mclock"
"github.com/CortexFoundation/CortexTheseus/log"
"github.com/CortexFoundation/CortexTheseus/rpc"
"github.com/CortexFoundation/robot/backend"
"github.com/CortexFoundation/torrentfs/params"
"github.com/CortexFoundation/torrentfs/types"
lru "github.com/hashicorp/golang-lru/v2"
ttl "github.com/hashicorp/golang-lru/v2/expirable"
"github.com/ucwong/golang-kv"
"math"
"path/filepath"
"runtime"
"sync"
"sync/atomic"
"time"

"github.com/CortexFoundation/robot/backend"
)

// Monitor observes the data changes on the blockchain and synchronizes.
Expand Down
5 changes: 3 additions & 2 deletions rpc.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,14 @@ package robot

import (
"errors"
"strconv"
"time"

"github.com/CortexFoundation/CortexTheseus/common/hexutil"
"github.com/CortexFoundation/CortexTheseus/log"
"github.com/CortexFoundation/CortexTheseus/rpc"
"github.com/CortexFoundation/torrentfs/params"
"github.com/CortexFoundation/torrentfs/types"
"strconv"
"time"
)

// SetConnection method builds connection to remote or local communicator.
Expand Down
7 changes: 4 additions & 3 deletions service.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,15 @@ package robot
import (
"encoding/json"
"errors"
"math/big"
"strconv"
"time"

"github.com/CortexFoundation/CortexTheseus/common"
"github.com/CortexFoundation/CortexTheseus/common/mclock"
"github.com/CortexFoundation/CortexTheseus/log"
params1 "github.com/CortexFoundation/CortexTheseus/params"
"github.com/CortexFoundation/torrentfs/types"
"math/big"
"strconv"
"time"
)

// solve block from node
Expand Down

0 comments on commit 67fbc38

Please sign in to comment.