Skip to content

Commit

Permalink
mod github.com/bittorrent/go-btfs-common
Browse files Browse the repository at this point in the history
  • Loading branch information
turingczz committed Aug 17, 2022
1 parent 661a586 commit bdeb12a
Show file tree
Hide file tree
Showing 40 changed files with 538 additions and 537 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ RUN wget --quiet https://github.com/uber/prototool/releases/download/v${PROTOTOO
RUN tar -xf prototool-Linux-x86_64.tar.gz
RUN mv prototool/bin/prototool /usr/local/bin/prototool

ENV SRC_DIR /go/src/github.com/tron-us/go-btfs-common
ENV SRC_DIR /go/src/github.com/bittorrent/go-btfs-common

# Download packages first so they can be cached.
COPY go.mod go.sum $SRC_DIR/
Expand Down
2 changes: 1 addition & 1 deletion config/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package config
import (
"strconv"

"github.com/tron-us/go-btfs-common/protos/guard"
"github.com/bittorrent/go-btfs-common/protos/guard"
"github.com/tron-us/go-common/v2/env"
"github.com/tron-us/go-common/v2/log"

Expand Down
2 changes: 1 addition & 1 deletion crypto/crypto_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"bytes"
"testing"

ledgerPb "github.com/tron-us/go-btfs-common/protos/ledger"
ledgerPb "github.com/bittorrent/go-btfs-common/protos/ledger"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module github.com/tron-us/go-btfs-common
module github.com/bittorrent/go-btfs-common

go 1.13

Expand Down
24 changes: 12 additions & 12 deletions js/protos/hub/hub_pb.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ var jspb = require('google-protobuf');
var goog = jspb;
var global = Function('return this')();

var github_com_tron$us_go$btfs$common_protos_node_node_pb = require('../../github.com/tron-us/go-btfs-common/protos/node/node_pb.js');
goog.object.extend(proto, github_com_tron$us_go$btfs$common_protos_node_node_pb);
var github_com_bittorrent_go$btfs$common_protos_node_node_pb = require('../../github.com/bittorrent/go-btfs-common/protos/node/node_pb.js');
goog.object.extend(proto, github_com_bittorrent_go$btfs$common_protos_node_node_pb);
var github_com_tron$us_protobuf_gogoproto_gogo_pb = require('../../github.com/tron-us/protobuf/gogoproto/gogo_pb.js');
goog.object.extend(proto, github_com_tron$us_protobuf_gogoproto_gogo_pb);
var google_protobuf_timestamp_pb = require('google-protobuf/google/protobuf/timestamp_pb.js');
Expand Down Expand Up @@ -2194,7 +2194,7 @@ proto.hub.StatsResp.toObject = function(includeInstance, msg) {
code: jspb.Message.getFieldWithDefault(msg, 1, 0),
message: jspb.Message.getFieldWithDefault(msg, 2, ""),
responseTime: (f = msg.getResponseTime()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f),
stats: (f = msg.getStats()) && github_com_tron$us_go$btfs$common_protos_node_node_pb.StorageStat.HostStats.toObject(includeInstance, f)
stats: (f = msg.getStats()) && github_com_bittorrent_go$btfs$common_protos_node_node_pb.StorageStat.HostStats.toObject(includeInstance, f)
};

if (includeInstance) {
Expand Down Expand Up @@ -2245,8 +2245,8 @@ proto.hub.StatsResp.deserializeBinaryFromReader = function(msg, reader) {
msg.setResponseTime(value);
break;
case 4:
var value = new github_com_tron$us_go$btfs$common_protos_node_node_pb.StorageStat.HostStats;
reader.readMessage(value,github_com_tron$us_go$btfs$common_protos_node_node_pb.StorageStat.HostStats.deserializeBinaryFromReader);
var value = new github_com_bittorrent_go$btfs$common_protos_node_node_pb.StorageStat.HostStats;
reader.readMessage(value,github_com_bittorrent_go$btfs$common_protos_node_node_pb.StorageStat.HostStats.deserializeBinaryFromReader);
msg.setStats(value);
break;
default:
Expand Down Expand Up @@ -2305,7 +2305,7 @@ proto.hub.StatsResp.serializeBinaryToWriter = function(message, writer) {
writer.writeMessage(
4,
f,
github_com_tron$us_go$btfs$common_protos_node_node_pb.StorageStat.HostStats.serializeBinaryToWriter
github_com_bittorrent_go$btfs$common_protos_node_node_pb.StorageStat.HostStats.serializeBinaryToWriter
);
}
};
Expand Down Expand Up @@ -2390,7 +2390,7 @@ proto.hub.StatsResp.prototype.hasResponseTime = function() {
*/
proto.hub.StatsResp.prototype.getStats = function() {
return /** @type{?proto.node.StorageStat.HostStats} */ (
jspb.Message.getWrapperField(this, github_com_tron$us_go$btfs$common_protos_node_node_pb.StorageStat.HostStats, 4));
jspb.Message.getWrapperField(this, github_com_bittorrent_go$btfs$common_protos_node_node_pb.StorageStat.HostStats, 4));
};


Expand Down Expand Up @@ -3467,7 +3467,7 @@ proto.hub.Host.toObject = function(includeInstance, msg) {
collateralLost: jspb.Message.getFieldWithDefault(msg, 25, 0),
collateralBurn: jspb.Message.getFieldWithDefault(msg, 26, 0),
countryShort: jspb.Message.getFieldWithDefault(msg, 27, ""),
flg: (f = msg.getFlg()) && github_com_tron$us_go$btfs$common_protos_node_node_pb.Node.ExperimentalFlags.toObject(includeInstance, f),
flg: (f = msg.getFlg()) && github_com_bittorrent_go$btfs$common_protos_node_node_pb.Node.ExperimentalFlags.toObject(includeInstance, f),
discovery: jspb.Message.getFloatingPointFieldWithDefault(msg, 29, 0.0),
uptimeScore: jspb.Message.getFloatingPointFieldWithDefault(msg, 30, 0.0),
ageScore: jspb.Message.getFloatingPointFieldWithDefault(msg, 31, 0.0),
Expand Down Expand Up @@ -3623,8 +3623,8 @@ proto.hub.Host.deserializeBinaryFromReader = function(msg, reader) {
msg.setCountryShort(value);
break;
case 28:
var value = new github_com_tron$us_go$btfs$common_protos_node_node_pb.Node.ExperimentalFlags;
reader.readMessage(value,github_com_tron$us_go$btfs$common_protos_node_node_pb.Node.ExperimentalFlags.deserializeBinaryFromReader);
var value = new github_com_bittorrent_go$btfs$common_protos_node_node_pb.Node.ExperimentalFlags;
reader.readMessage(value,github_com_bittorrent_go$btfs$common_protos_node_node_pb.Node.ExperimentalFlags.deserializeBinaryFromReader);
msg.setFlg(value);
break;
case 29:
Expand Down Expand Up @@ -3881,7 +3881,7 @@ proto.hub.Host.serializeBinaryToWriter = function(message, writer) {
writer.writeMessage(
28,
f,
github_com_tron$us_go$btfs$common_protos_node_node_pb.Node.ExperimentalFlags.serializeBinaryToWriter
github_com_bittorrent_go$btfs$common_protos_node_node_pb.Node.ExperimentalFlags.serializeBinaryToWriter
);
}
f = message.getDiscovery();
Expand Down Expand Up @@ -4485,7 +4485,7 @@ proto.hub.Host.prototype.setCountryShort = function(value) {
*/
proto.hub.Host.prototype.getFlg = function() {
return /** @type{?proto.node.Node.ExperimentalFlags} */ (
jspb.Message.getWrapperField(this, github_com_tron$us_go$btfs$common_protos_node_node_pb.Node.ExperimentalFlags, 28));
jspb.Message.getWrapperField(this, github_com_bittorrent_go$btfs$common_protos_node_node_pb.Node.ExperimentalFlags, 28));
};


Expand Down
4 changes: 2 additions & 2 deletions js/protos/node/node_pb.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ var jspb = require('google-protobuf');
var goog = jspb;
var global = Function('return this')();

var github_com_tron$us_go$btfs$common_protos_guard_guard_pb = require('../../github.com/tron-us/go-btfs-common/protos/guard/guard_pb.js');
goog.object.extend(proto, github_com_tron$us_go$btfs$common_protos_guard_guard_pb);
var github_com_bittorrent_go$btfs$common_protos_guard_guard_pb = require('../../github.com/bittorrent/go-btfs-common/protos/guard/guard_pb.js');
goog.object.extend(proto, github_com_bittorrent_go$btfs$common_protos_guard_guard_pb);
var github_com_tron$us_protobuf_gogoproto_gogo_pb = require('../../github.com/tron-us/protobuf/gogoproto/gogo_pb.js');
goog.object.extend(proto, github_com_tron$us_protobuf_gogoproto_gogo_pb);
var google_protobuf_timestamp_pb = require('google-protobuf/google/protobuf/timestamp_pb.js');
Expand Down
14 changes: 7 additions & 7 deletions js/protos/online/online_pb.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ var jspb = require('google-protobuf');
var goog = jspb;
var global = Function('return this')();

var github_com_tron$us_go$btfs$common_protos_node_node_pb = require('../../github.com/tron-us/go-btfs-common/protos/node/node_pb.js');
goog.object.extend(proto, github_com_tron$us_go$btfs$common_protos_node_node_pb);
var github_com_bittorrent_go$btfs$common_protos_node_node_pb = require('../../github.com/bittorrent/go-btfs-common/protos/node/node_pb.js');
goog.object.extend(proto, github_com_bittorrent_go$btfs$common_protos_node_node_pb);
var github_com_tron$us_protobuf_gogoproto_gogo_pb = require('../../github.com/tron-us/protobuf/gogoproto/gogo_pb.js');
goog.object.extend(proto, github_com_tron$us_protobuf_gogoproto_gogo_pb);
var google_protobuf_timestamp_pb = require('google-protobuf/google/protobuf/timestamp_pb.js');
Expand Down Expand Up @@ -402,7 +402,7 @@ proto.online.PayLoadInfo.prototype.toObject = function(opt_includeInstance) {
proto.online.PayLoadInfo.toObject = function(includeInstance, msg) {
var f, obj = {
nodeId: jspb.Message.getFieldWithDefault(msg, 1, ""),
node: (f = msg.getNode()) && github_com_tron$us_go$btfs$common_protos_node_node_pb.Node.toObject(includeInstance, f),
node: (f = msg.getNode()) && github_com_bittorrent_go$btfs$common_protos_node_node_pb.Node.toObject(includeInstance, f),
lastSignedInfo: (f = msg.getLastSignedInfo()) && proto.online.SignedInfo.toObject(includeInstance, f),
lastSignature: jspb.Message.getFieldWithDefault(msg, 4, ""),
lastTime: (f = msg.getLastTime()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f)
Expand Down Expand Up @@ -447,8 +447,8 @@ proto.online.PayLoadInfo.deserializeBinaryFromReader = function(msg, reader) {
msg.setNodeId(value);
break;
case 2:
var value = new github_com_tron$us_go$btfs$common_protos_node_node_pb.Node;
reader.readMessage(value,github_com_tron$us_go$btfs$common_protos_node_node_pb.Node.deserializeBinaryFromReader);
var value = new github_com_bittorrent_go$btfs$common_protos_node_node_pb.Node;
reader.readMessage(value,github_com_bittorrent_go$btfs$common_protos_node_node_pb.Node.deserializeBinaryFromReader);
msg.setNode(value);
break;
case 3:
Expand Down Expand Up @@ -506,7 +506,7 @@ proto.online.PayLoadInfo.serializeBinaryToWriter = function(message, writer) {
writer.writeMessage(
2,
f,
github_com_tron$us_go$btfs$common_protos_node_node_pb.Node.serializeBinaryToWriter
github_com_bittorrent_go$btfs$common_protos_node_node_pb.Node.serializeBinaryToWriter
);
}
f = message.getLastSignedInfo();
Expand Down Expand Up @@ -559,7 +559,7 @@ proto.online.PayLoadInfo.prototype.setNodeId = function(value) {
*/
proto.online.PayLoadInfo.prototype.getNode = function() {
return /** @type{?proto.node.Node} */ (
jspb.Message.getWrapperField(this, github_com_tron$us_go$btfs$common_protos_node_node_pb.Node, 2));
jspb.Message.getWrapperField(this, github_com_bittorrent_go$btfs$common_protos_node_node_pb.Node, 2));
};


Expand Down
24 changes: 12 additions & 12 deletions js/protos/status/status_pb.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ var jspb = require('google-protobuf');
var goog = jspb;
var global = Function('return this')();

var github_com_tron$us_go$btfs$common_protos_node_node_pb = require('../../github.com/tron-us/go-btfs-common/protos/node/node_pb.js');
goog.object.extend(proto, github_com_tron$us_go$btfs$common_protos_node_node_pb);
var github_com_bittorrent_go$btfs$common_protos_node_node_pb = require('../../github.com/bittorrent/go-btfs-common/protos/node/node_pb.js');
goog.object.extend(proto, github_com_bittorrent_go$btfs$common_protos_node_node_pb);
var github_com_tron$us_protobuf_gogoproto_gogo_pb = require('../../github.com/tron-us/protobuf/gogoproto/gogo_pb.js');
goog.object.extend(proto, github_com_tron$us_protobuf_gogoproto_gogo_pb);
var google_protobuf_empty_pb = require('google-protobuf/google/protobuf/empty_pb.js');
Expand Down Expand Up @@ -1592,7 +1592,7 @@ proto.status.ScoreHistoryReq.prototype.toObject = function(opt_includeInstance)
proto.status.ScoreHistoryReq.toObject = function(includeInstance, msg) {
var f, obj = {
scoresList: jspb.Message.toObjectList(msg.getScoresList(),
github_com_tron$us_go$btfs$common_protos_node_node_pb.ScoreHistoryTab.toObject, includeInstance)
github_com_bittorrent_go$btfs$common_protos_node_node_pb.ScoreHistoryTab.toObject, includeInstance)
};

if (includeInstance) {
Expand Down Expand Up @@ -1630,8 +1630,8 @@ proto.status.ScoreHistoryReq.deserializeBinaryFromReader = function(msg, reader)
var field = reader.getFieldNumber();
switch (field) {
case 1:
var value = new github_com_tron$us_go$btfs$common_protos_node_node_pb.ScoreHistoryTab;
reader.readMessage(value,github_com_tron$us_go$btfs$common_protos_node_node_pb.ScoreHistoryTab.deserializeBinaryFromReader);
var value = new github_com_bittorrent_go$btfs$common_protos_node_node_pb.ScoreHistoryTab;
reader.readMessage(value,github_com_bittorrent_go$btfs$common_protos_node_node_pb.ScoreHistoryTab.deserializeBinaryFromReader);
msg.addScores(value);
break;
default:
Expand Down Expand Up @@ -1668,7 +1668,7 @@ proto.status.ScoreHistoryReq.serializeBinaryToWriter = function(message, writer)
writer.writeRepeatedMessage(
1,
f,
github_com_tron$us_go$btfs$common_protos_node_node_pb.ScoreHistoryTab.serializeBinaryToWriter
github_com_bittorrent_go$btfs$common_protos_node_node_pb.ScoreHistoryTab.serializeBinaryToWriter
);
}
};
Expand All @@ -1680,7 +1680,7 @@ proto.status.ScoreHistoryReq.serializeBinaryToWriter = function(message, writer)
*/
proto.status.ScoreHistoryReq.prototype.getScoresList = function() {
return /** @type{!Array<!proto.node.ScoreHistoryTab>} */ (
jspb.Message.getRepeatedWrapperField(this, github_com_tron$us_go$btfs$common_protos_node_node_pb.ScoreHistoryTab, 1));
jspb.Message.getRepeatedWrapperField(this, github_com_bittorrent_go$btfs$common_protos_node_node_pb.ScoreHistoryTab, 1));
};


Expand Down Expand Up @@ -2658,7 +2658,7 @@ proto.status.NodeContractStatReq.prototype.toObject = function(opt_includeInstan
proto.status.NodeContractStatReq.toObject = function(includeInstance, msg) {
var f, obj = {
nodeContractStatsList: jspb.Message.toObjectList(msg.getNodeContractStatsList(),
github_com_tron$us_go$btfs$common_protos_node_node_pb.NodeContractStat.toObject, includeInstance)
github_com_bittorrent_go$btfs$common_protos_node_node_pb.NodeContractStat.toObject, includeInstance)
};

if (includeInstance) {
Expand Down Expand Up @@ -2696,8 +2696,8 @@ proto.status.NodeContractStatReq.deserializeBinaryFromReader = function(msg, rea
var field = reader.getFieldNumber();
switch (field) {
case 1:
var value = new github_com_tron$us_go$btfs$common_protos_node_node_pb.NodeContractStat;
reader.readMessage(value,github_com_tron$us_go$btfs$common_protos_node_node_pb.NodeContractStat.deserializeBinaryFromReader);
var value = new github_com_bittorrent_go$btfs$common_protos_node_node_pb.NodeContractStat;
reader.readMessage(value,github_com_bittorrent_go$btfs$common_protos_node_node_pb.NodeContractStat.deserializeBinaryFromReader);
msg.addNodeContractStats(value);
break;
default:
Expand Down Expand Up @@ -2734,7 +2734,7 @@ proto.status.NodeContractStatReq.serializeBinaryToWriter = function(message, wri
writer.writeRepeatedMessage(
1,
f,
github_com_tron$us_go$btfs$common_protos_node_node_pb.NodeContractStat.serializeBinaryToWriter
github_com_bittorrent_go$btfs$common_protos_node_node_pb.NodeContractStat.serializeBinaryToWriter
);
}
};
Expand All @@ -2746,7 +2746,7 @@ proto.status.NodeContractStatReq.serializeBinaryToWriter = function(message, wri
*/
proto.status.NodeContractStatReq.prototype.getNodeContractStatsList = function() {
return /** @type{!Array<!proto.node.NodeContractStat>} */ (
jspb.Message.getRepeatedWrapperField(this, github_com_tron$us_go$btfs$common_protos_node_node_pb.NodeContractStat, 1));
jspb.Message.getRepeatedWrapperField(this, github_com_bittorrent_go$btfs$common_protos_node_node_pb.NodeContractStat, 1));
};


Expand Down
4 changes: 2 additions & 2 deletions ledger/escrow.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ package ledger
import (
"fmt"

escrowpb "github.com/tron-us/go-btfs-common/protos/escrow"
ledgerpb "github.com/tron-us/go-btfs-common/protos/ledger"
escrowpb "github.com/bittorrent/go-btfs-common/protos/escrow"
ledgerpb "github.com/bittorrent/go-btfs-common/protos/ledger"

ic "github.com/libp2p/go-libp2p-core/crypto"
)
Expand Down
6 changes: 3 additions & 3 deletions ledger/ledger.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ import (
"context"
"time"

ledgerpb "github.com/tron-us/go-btfs-common/protos/ledger"
ledgerpb "github.com/bittorrent/go-btfs-common/protos/ledger"

"github.com/tron-us/go-btfs-common/crypto"
"github.com/tron-us/go-btfs-common/utils/grpc"
"github.com/bittorrent/go-btfs-common/crypto"
"github.com/bittorrent/go-btfs-common/utils/grpc"
"github.com/tron-us/protobuf/proto"

ic "github.com/libp2p/go-libp2p-core/crypto"
Expand Down
4 changes: 2 additions & 2 deletions ledger/sample/demo.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ package main

import (
"context"
"github.com/tron-us/go-btfs-common/crypto"
"github.com/tron-us/go-btfs-common/ledger"
"github.com/bittorrent/go-btfs-common/crypto"
"github.com/bittorrent/go-btfs-common/ledger"
"github.com/tron-us/go-common/v2/log"

"go.uber.org/zap"
Expand Down
2 changes: 1 addition & 1 deletion protos/escrow/escrow.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion protos/exchange/exchange_message.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit bdeb12a

Please sign in to comment.