Skip to content

Commit 8b7465f

Browse files
author
Qi Xiao
committed
Fix compilation failure bug
1 parent 3a7ff27 commit 8b7465f

9 files changed

Lines changed: 11 additions & 13 deletions

File tree

cmd/cql-minerd/node.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ import (
2525

2626
"github.com/CovenantSQL/CovenantSQL/conf"
2727
"github.com/CovenantSQL/CovenantSQL/crypto/kms"
28-
"github.com/CovenantSQL/CovenantSQL/kayak"
28+
kt "github.com/CovenantSQL/CovenantSQL/kayak/types"
2929
"github.com/CovenantSQL/CovenantSQL/proto"
3030
"github.com/CovenantSQL/CovenantSQL/route"
3131
"github.com/CovenantSQL/CovenantSQL/rpc"
@@ -112,7 +112,7 @@ func registerNodeToBP(timeout time.Duration) (err error) {
112112
ch <- id
113113
return
114114
}
115-
if strings.Contains(err.Error(), kayak.ErrNotLeader.Error()) {
115+
if strings.Contains(err.Error(), kt.ErrNotLeader.Error()) {
116116
log.Debug("stop ping non leader BP node")
117117
return
118118
}

sqlchain/chain.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -916,7 +916,7 @@ func (c *Chain) syncAckedQuery(height int32, header *hash.Hash, id proto.NodeID)
916916
},
917917
DatabaseID: c.rt.databaseID,
918918
FetchAckedQueryReq: FetchAckedQueryReq{
919-
Height: height,
919+
Height: height,
920920
SignedAckedHash: header,
921921
},
922922
}

sqlchain/chain_test.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,6 @@ func TestMultiChain(t *testing.T) {
189189
chain: chain,
190190
}
191191

192-
193192
}
194193

195194
// Create a master BP for RPC test

sqlchain/queryindex.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,13 @@ package sqlchain
1919
// TODO(leventeliu): use pooled objects to speed up this index.
2020

2121
import (
22-
"github.com/pkg/errors"
2322
"sync"
2423

2524
"github.com/CovenantSQL/CovenantSQL/crypto/hash"
2625
ct "github.com/CovenantSQL/CovenantSQL/sqlchain/types"
2726
"github.com/CovenantSQL/CovenantSQL/utils/log"
2827
wt "github.com/CovenantSQL/CovenantSQL/worker/types"
28+
"github.com/pkg/errors"
2929
)
3030

3131
var (

sqlchain/queryindex_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,13 @@
1717
package sqlchain
1818

1919
import (
20-
"github.com/pkg/errors"
2120
"math/rand"
2221
"reflect"
2322
"testing"
2423

2524
"github.com/CovenantSQL/CovenantSQL/crypto/hash"
2625
"github.com/CovenantSQL/CovenantSQL/utils/log"
26+
"github.com/pkg/errors"
2727
)
2828

2929
const (

sqlchain/runtime.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,13 @@ package sqlchain
1818

1919
import (
2020
"fmt"
21-
"github.com/CovenantSQL/CovenantSQL/utils/log"
2221
"sync"
2322
"time"
2423

2524
"github.com/CovenantSQL/CovenantSQL/crypto/hash"
2625
"github.com/CovenantSQL/CovenantSQL/proto"
2726
ct "github.com/CovenantSQL/CovenantSQL/sqlchain/types"
27+
"github.com/CovenantSQL/CovenantSQL/utils/log"
2828
wt "github.com/CovenantSQL/CovenantSQL/worker/types"
2929
)
3030

utils/bytes_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ func TestNewLevelDBKey(t *testing.T) {
3636
So(ConcatAll([]byte{'0', '1', '2', '3'}, nil, []byte{'x', 'y', 'z'}),
3737
ShouldResemble, []byte{'0', '1', '2', '3', 'x', 'y', 'z'})
3838
So(ConcatAll([]byte{'0', '1', '2', '3'}, []byte{}, []byte{'x', 'y', 'z'}),
39-
ShouldResemble, []byte{'0', '1', '2', '3','x', 'y', 'z'})
39+
ShouldResemble, []byte{'0', '1', '2', '3', 'x', 'y', 'z'})
4040
So(ConcatAll(nil, []byte{'0', '1', '2', '3'}, nil, []byte{'x', 'y', 'z'}),
4141
ShouldResemble, []byte{'0', '1', '2', '3', 'x', 'y', 'z'})
4242
So(ConcatAll([]byte{}, []byte{'0', '1', '2', '3'}, nil, []byte{'x', 'y', 'z'}, nil),

utils/log/logwrapper_test.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ import (
2222
"time"
2323

2424
"github.com/pkg/errors"
25-
2625
"github.com/sirupsen/logrus"
2726
)
2827

worker/types/init_service_type.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,10 @@ type InitService struct {
3232

3333
// ResourceMeta defines single database resource meta.
3434
type ResourceMeta struct {
35-
Node uint16 // reserved node count
36-
Space uint64 // reserved storage space in bytes
37-
Memory uint64 // reserved memory in bytes
38-
LoadAvgPerCPU uint64 // max loadAvg15 per CPU
35+
Node uint16 // reserved node count
36+
Space uint64 // reserved storage space in bytes
37+
Memory uint64 // reserved memory in bytes
38+
LoadAvgPerCPU uint64 // max loadAvg15 per CPU
3939
EncryptionKey string `hspack:"-"` // encryption key for database instance
4040
}
4141

0 commit comments

Comments
 (0)