Skip to content

Commit

Permalink
[FAB-6079] Update fabric dependency
Browse files Browse the repository at this point in the history
Change-Id: Icc327301b3a5e3c311467dbc166d9cb56841431c
Signed-off-by: Firas Qutishat <firas.qutishat@securekey.com>
  • Loading branch information
fqutishat committed Sep 8, 2017
1 parent 0f6b2f6 commit f6e947e
Show file tree
Hide file tree
Showing 1,176 changed files with 51 additions and 539,429 deletions.
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -8,6 +8,7 @@
.DS_Store
.vscode
debug.test
vendor/


# Files auto-generated by docker-compose
Expand Down
14 changes: 10 additions & 4 deletions Gopkg.lock

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

2 changes: 1 addition & 1 deletion Gopkg.toml
Expand Up @@ -6,7 +6,7 @@

[[constraint]]
name = "github.com/hyperledger/fabric"
version = "~1.0.0"
branch = "master"

[[constraint]]
name = "github.com/hyperledger/fabric-ca"
Expand Down
4 changes: 2 additions & 2 deletions pkg/config/config_test.go
Expand Up @@ -381,7 +381,7 @@ func TestMultipleVipers(t *testing.T) {
if err != nil {
fmt.Println(err.Error())
}
testValue1 := viper.GetString("test.testKey")
testValue1 := viper.GetString("test.testkey")
// Read initial value from test.yaml
if testValue1 != "testvalue" {
t.Fatalf("Expected testValue before config initialization got: %s", testValue1)
Expand All @@ -393,7 +393,7 @@ func TestMultipleVipers(t *testing.T) {
}

// Make sure initial value is unaffected
testValue2 := viper.GetString("test.testKey")
testValue2 := viper.GetString("test.testkey")
if testValue2 != "testvalue" {
t.Fatalf("Expected testvalue after config initialization")
}
Expand Down
6 changes: 1 addition & 5 deletions pkg/fabric-ca-client/fabricca_test.go
Expand Up @@ -122,11 +122,7 @@ func TestRegister(t *testing.T) {
if err.Error() != "Error Registering User: Register was called without a Name set" {
t.Fatalf("Expected error without registration information. Got: %s", err.Error())
}
// Register without registration affiliation parameter
_, err = fabricCAClient.Register(user, &ca.RegistrationRequest{Name: "test"})
if err.Error() != "Error Registering User: Registration request does not have an affiliation" {
t.Fatalf("Expected error without registration information. Got: %s", err.Error())
}

// Register with valid request
var attributes []ca.Attribute
attributes = append(attributes, ca.Attribute{Key: "test1", Value: "test2"})
Expand Down
22 changes: 11 additions & 11 deletions pkg/fabric-client/channel/config.go
Expand Up @@ -11,7 +11,7 @@ import (

"github.com/golang/protobuf/proto"

fabric_config "github.com/hyperledger/fabric/common/config"
channelConfig "github.com/hyperledger/fabric/common/channelconfig"
"github.com/hyperledger/fabric/msp"

"github.com/hyperledger/fabric/protos/common"
Expand Down Expand Up @@ -308,7 +308,7 @@ func loadConfigValue(configItems *configItems, key string, versionsValue *common
versionsValue.Version = configValue.Version

switch key {
case fabric_config.AnchorPeersKey:
case channelConfig.AnchorPeersKey:
anchorPeers := &pb.AnchorPeers{}
err := proto.Unmarshal(configValue.Value, anchorPeers)
if err != nil {
Expand All @@ -326,7 +326,7 @@ func loadConfigValue(configItems *configItems, key string, versionsValue *common
}
break

case fabric_config.MSPKey:
case channelConfig.MSPKey:
mspConfig := &mb.MSPConfig{}
err := proto.Unmarshal(configValue.Value, mspConfig)
if err != nil {
Expand All @@ -343,7 +343,7 @@ func loadConfigValue(configItems *configItems, key string, versionsValue *common
configItems.msps = append(configItems.msps, mspConfig)
break

case fabric_config.ConsensusTypeKey:
case channelConfig.ConsensusTypeKey:
consensusType := &ab.ConsensusType{}
err := proto.Unmarshal(configValue.Value, consensusType)
if err != nil {
Expand All @@ -354,7 +354,7 @@ func loadConfigValue(configItems *configItems, key string, versionsValue *common
// TODO: Do something with this value
break

case fabric_config.BatchSizeKey:
case channelConfig.BatchSizeKey:
batchSize := &ab.BatchSize{}
err := proto.Unmarshal(configValue.Value, batchSize)
if err != nil {
Expand All @@ -367,7 +367,7 @@ func loadConfigValue(configItems *configItems, key string, versionsValue *common
// TODO: Do something with this value
break

case fabric_config.BatchTimeoutKey:
case channelConfig.BatchTimeoutKey:
batchTimeout := &ab.BatchTimeout{}
err := proto.Unmarshal(configValue.Value, batchTimeout)
if err != nil {
Expand All @@ -377,7 +377,7 @@ func loadConfigValue(configItems *configItems, key string, versionsValue *common
// TODO: Do something with this value
break

case fabric_config.ChannelRestrictionsKey:
case channelConfig.ChannelRestrictionsKey:
channelRestrictions := &ab.ChannelRestrictions{}
err := proto.Unmarshal(configValue.Value, channelRestrictions)
if err != nil {
Expand All @@ -387,7 +387,7 @@ func loadConfigValue(configItems *configItems, key string, versionsValue *common
// TODO: Do something with this value
break

case fabric_config.HashingAlgorithmKey:
case channelConfig.HashingAlgorithmKey:
hashingAlgorithm := &common.HashingAlgorithm{}
err := proto.Unmarshal(configValue.Value, hashingAlgorithm)
if err != nil {
Expand All @@ -397,7 +397,7 @@ func loadConfigValue(configItems *configItems, key string, versionsValue *common
// TODO: Do something with this value
break

case fabric_config.ConsortiumKey:
case channelConfig.ConsortiumKey:
consortium := &common.Consortium{}
err := proto.Unmarshal(configValue.Value, consortium)
if err != nil {
Expand All @@ -407,7 +407,7 @@ func loadConfigValue(configItems *configItems, key string, versionsValue *common
// TODO: Do something with this value
break

case fabric_config.BlockDataHashingStructureKey:
case channelConfig.BlockDataHashingStructureKey:
bdhstruct := &common.BlockDataHashingStructure{}
err := proto.Unmarshal(configValue.Value, bdhstruct)
if err != nil {
Expand All @@ -417,7 +417,7 @@ func loadConfigValue(configItems *configItems, key string, versionsValue *common
// TODO: Do something with this value
break

case fabric_config.OrdererAddressesKey:
case channelConfig.OrdererAddressesKey:
ordererAddresses := &common.OrdererAddresses{}
err := proto.Unmarshal(configValue.Value, ordererAddresses)
if err != nil {
Expand Down
22 changes: 11 additions & 11 deletions pkg/fabric-client/mocks/mockdata.go
Expand Up @@ -10,7 +10,7 @@ import (
"fmt"

"github.com/golang/protobuf/proto"
fabric_config "github.com/hyperledger/fabric/common/config"
channelConfig "github.com/hyperledger/fabric/common/channelconfig"
ledger_util "github.com/hyperledger/fabric/core/ledger/util"
"github.com/hyperledger/fabric/protos/common"
mb "github.com/hyperledger/fabric/protos/msp"
Expand Down Expand Up @@ -168,7 +168,7 @@ func (b *MockConfigGroupBuilder) buildConfigGroup() *common.ConfigGroup {
"Admins": b.buildBasicConfigPolicy(),
},
Values: map[string]*common.ConfigValue{
fabric_config.OrdererAddressesKey: b.buildOrdererAddressesConfigValue(),
channelConfig.OrdererAddressesKey: b.buildOrdererAddressesConfigValue(),
},
Version: b.Version,
ModPolicy: b.ModPolicy,
Expand Down Expand Up @@ -200,13 +200,13 @@ func (b *MockConfigGroupBuilder) buildOrdererGroup() *common.ConfigGroup {
"Admins": b.buildBasicConfigPolicy(),
},
Values: map[string]*common.ConfigValue{
fabric_config.BatchSizeKey: b.buildBatchSizeConfigValue(),
fabric_config.AnchorPeersKey: b.buildAnchorPeerConfigValue(),
fabric_config.ConsensusTypeKey: b.buildConsensusTypeConfigValue(),
fabric_config.BatchTimeoutKey: b.buildBatchTimeoutConfigValue(),
fabric_config.ChannelRestrictionsKey: b.buildChannelRestrictionsConfigValue(),
fabric_config.HashingAlgorithmKey: b.buildHashingAlgorithmConfigValue(),
fabric_config.BlockDataHashingStructureKey: b.buildBlockDataHashingStructureConfigValue(),
channelConfig.BatchSizeKey: b.buildBatchSizeConfigValue(),
channelConfig.AnchorPeersKey: b.buildAnchorPeerConfigValue(),
channelConfig.ConsensusTypeKey: b.buildConsensusTypeConfigValue(),
channelConfig.BatchTimeoutKey: b.buildBatchTimeoutConfigValue(),
channelConfig.ChannelRestrictionsKey: b.buildChannelRestrictionsConfigValue(),
channelConfig.HashingAlgorithmKey: b.buildHashingAlgorithmConfigValue(),
channelConfig.BlockDataHashingStructureKey: b.buildBlockDataHashingStructureConfigValue(),
},
Version: b.Version,
ModPolicy: b.ModPolicy,
Expand All @@ -222,7 +222,7 @@ func (b *MockConfigGroupBuilder) buildMSPGroup(mspName string) *common.ConfigGro
"Readers": b.buildSignatureConfigPolicy(),
},
Values: map[string]*common.ConfigValue{
fabric_config.MSPKey: b.buildMSPConfigValue(mspName),
channelConfig.MSPKey: b.buildMSPConfigValue(mspName),
// TODO: More
},
Version: b.Version,
Expand Down Expand Up @@ -395,7 +395,7 @@ func (b *MockConfigGroupBuilder) buildApplicationGroup() *common.ConfigGroup {
"Readers": b.buildSignatureConfigPolicy(),
},
Values: map[string]*common.ConfigValue{
fabric_config.BatchSizeKey: b.buildBatchSizeConfigValue(),
channelConfig.BatchSizeKey: b.buildBatchSizeConfigValue(),
// TODO: More
},
Version: b.Version,
Expand Down
@@ -1,14 +1,14 @@
-----BEGIN CERTIFICATE-----
MIICFjCCAb2gAwIBAgIUEsAD7LR8KQ8Y3kUPbF8/tFlEZ+8wCgYIKoZIzj0EAwIw
MIICFjCCAb2gAwIBAgIURqjLlqSGZdJCNacqnU9+jUJpV+AwCgYIKoZIzj0EAwIw
aDELMAkGA1UEBhMCVVMxFzAVBgNVBAgTDk5vcnRoIENhcm9saW5hMRQwEgYDVQQK
EwtIeXBlcmxlZGdlcjEPMA0GA1UECxMGRmFicmljMRkwFwYDVQQDExBmYWJyaWMt
Y2Etc2VydmVyMB4XDTE3MDgyMzE5NTkwMFoXDTMyMDgxOTE5NTkwMFowaDELMAkG
Y2Etc2VydmVyMB4XDTE3MDkwNzIxMzYwMFoXDTMyMDkwMzIxMzYwMFowaDELMAkG
A1UEBhMCVVMxFzAVBgNVBAgTDk5vcnRoIENhcm9saW5hMRQwEgYDVQQKEwtIeXBl
cmxlZGdlcjEPMA0GA1UECxMGRmFicmljMRkwFwYDVQQDExBmYWJyaWMtY2Etc2Vy
dmVyMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEkzg+aHdnO15K7KD0PFOi/22d
EhpGMyGdQuw+faPSYCQvShtwxoiwADZi1i+RQjL2hVdifEbtBUpMT6vzs5UhH6NF
dmVyMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEqm6goa57lPweODBSZkSEqxIy
f/wgpZdXXwdZP1UznfThPYYkSd1HQGSiJgbvVNZ+m86OOIhsQsURJsyIBngWAqNF
MEMwDgYDVR0PAQH/BAQDAgEGMBIGA1UdEwEB/wQIMA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Y2Y1sbQdC
CXoIJybVEmU+Ou/umqnRAsb/VPo0wk1T4Jd64whLMqpkH5iBD7CR+4VvYffxKqNF
MEMwDgYDVR0PAQH/BAQDAgEGMBIGA1UdEwEB/wQIMAYBAf8CAQEwHQYDVR0OBBYE
FDURrc9lWNXg4XUMcXfEZMgsjhMOMAoGCCqGSM49BAMCA0gAMEUCIQDkAq2qLQCB
EMNKECvzFLvpw+IzI8rAjSoLXS7mV+VIgQIgHj3M7LxkfnDg/85d5cp/f7D/RPSX
zdDmrOtKqqzLcmo=
FLKxntGLtBxeUFnnXZOIz5ccPi2qMAoGCCqGSM49BAMCA0gAMEUCIQDODcMl3iU8
Jy6y7+Xt2NCH2ZwfBuNnumDvRFnSinMjVAIgX3MFNeFUQt+sMLQ0f6ADtsNh/7C9
0fOrd3mRDUG0yh8=
-----END CERTIFICATE-----
3 changes: 0 additions & 3 deletions vendor/github.com/BurntSushi/toml/COMPATIBLE

This file was deleted.

14 changes: 0 additions & 14 deletions vendor/github.com/BurntSushi/toml/COPYING

This file was deleted.

19 changes: 0 additions & 19 deletions vendor/github.com/BurntSushi/toml/Makefile

This file was deleted.

0 comments on commit f6e947e

Please sign in to comment.