Commit c1cdb7ea authored by Lucas Kuhring's avatar Lucas Kuhring
Browse files

Fix references to config in code

parent c663e90b
......@@ -12,10 +12,10 @@ import (
"time"
"github.com/hyperledger/fabric/common/flogging"
"github.com/hyperledger/fabric/config"
"github.com/hyperledger/fabric/core/ledger"
"github.com/hyperledger/fabric/protos/common"
"github.com/hyperledger/fabric/protos/utils"
"github.com/hyperledger/fabric_org/config"
"github.com/pkg/errors"
)
......
......@@ -18,6 +18,7 @@ import (
"github.com/hyperledger/fabric/common/flogging"
"github.com/hyperledger/fabric/common/metrics"
"github.com/hyperledger/fabric/common/util"
"github.com/hyperledger/fabric/config"
"github.com/hyperledger/fabric/core/chaincode/platforms"
"github.com/hyperledger/fabric/core/chaincode/shim"
"github.com/hyperledger/fabric/core/common/ccprovider"
......@@ -27,7 +28,6 @@ import (
pb "github.com/hyperledger/fabric/protos/peer"
"github.com/hyperledger/fabric/protos/transientstore"
putils "github.com/hyperledger/fabric/protos/utils"
"github.com/hyperledger/fabric_org/config"
"github.com/pkg/errors"
"go.uber.org/zap"
)
......
......@@ -15,6 +15,7 @@ import (
"github.com/hyperledger/fabric/common/flogging"
commonledger "github.com/hyperledger/fabric/common/ledger"
"github.com/hyperledger/fabric/common/util"
"github.com/hyperledger/fabric/config"
"github.com/hyperledger/fabric/core/ledger"
"github.com/hyperledger/fabric/core/ledger/cceventmgmt"
"github.com/hyperledger/fabric/core/ledger/confighistory"
......@@ -28,7 +29,6 @@ import (
"github.com/hyperledger/fabric/core/ledger/pvtdatapolicy"
"github.com/hyperledger/fabric/protos/common"
"github.com/hyperledger/fabric/protos/peer"
"github.com/hyperledger/fabric_org/config"
"github.com/pkg/errors"
)
......
......@@ -16,6 +16,7 @@ import (
"github.com/golang/protobuf/proto"
vsccErrors "github.com/hyperledger/fabric/common/errors"
util2 "github.com/hyperledger/fabric/common/util"
"github.com/hyperledger/fabric/config"
"github.com/hyperledger/fabric/core/committer"
"github.com/hyperledger/fabric/core/committer/txvalidator"
"github.com/hyperledger/fabric/core/common/privdata"
......@@ -30,7 +31,6 @@ import (
"github.com/hyperledger/fabric/protos/peer"
transientstore2 "github.com/hyperledger/fabric/protos/transientstore"
"github.com/hyperledger/fabric/protos/utils"
"github.com/hyperledger/fabric_org/config"
"github.com/pkg/errors"
"github.com/spf13/viper"
)
......
......@@ -9,8 +9,19 @@ SPDX-License-Identifier: Apache-2.0
// function should be included in this package.
package main
import "github.com/hyperledger/fabric/orderer/common/server"
import (
"fmt"
"github.com/hyperledger/fabric/config"
"github.com/hyperledger/fabric/orderer/common/server"
)
func main() {
// Read in config
if err := config.ReadConfig("log.json"); err != nil {
fmt.Printf("%s\n", err)
}
server.Main()
}
......@@ -7,10 +7,12 @@ SPDX-License-Identifier: Apache-2.0
package main
import (
"fmt"
_ "net/http/pprof"
"os"
"strings"
"github.com/hyperledger/fabric/config"
"github.com/hyperledger/fabric/peer/chaincode"
"github.com/hyperledger/fabric/peer/channel"
"github.com/hyperledger/fabric/peer/clilogging"
......@@ -28,6 +30,11 @@ var mainCmd = &cobra.Command{
func main() {
// Read in config
if err := config.ReadConfig("log.json"); err != nil {
fmt.Printf("%s\n", err)
}
// For environment variables.
viper.SetEnvPrefix(common.CmdRoot)
viper.AutomaticEnv()
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment