Skip to content

Commit

Permalink
[FAB-11827] Rename package names/dirs for validator
Browse files Browse the repository at this point in the history
In order to be more compliant with the go naming conventions, packages and
directories defined to contain 1.2 and 1.3 validation logic should be renamed.

Change-Id: If0973e0254e49310771fdcc8c859b0d158f1be47
Signed-off-by: Alessandro Sorniotti <[email protected]>
Signed-off-by: Matthias Neugschwandtner <[email protected]>
  • Loading branch information
ale-linux committed Sep 1, 2018
1 parent 2d67d38 commit c417075
Show file tree
Hide file tree
Showing 17 changed files with 13 additions and 13 deletions.
8 changes: 4 additions & 4 deletions core/handlers/validation/builtin/default_validation.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ import (
. "github.com/hyperledger/fabric/core/handlers/validation/api/identities"
. "github.com/hyperledger/fabric/core/handlers/validation/api/policies"
. "github.com/hyperledger/fabric/core/handlers/validation/api/state"
"github.com/hyperledger/fabric/core/handlers/validation/builtin/1.2"
"github.com/hyperledger/fabric/core/handlers/validation/builtin/1.3"
"github.com/hyperledger/fabric/core/handlers/validation/builtin/v12"
"github.com/hyperledger/fabric/core/handlers/validation/builtin/v13"
"github.com/hyperledger/fabric/protos/common"
"github.com/pkg/errors"
)
Expand Down Expand Up @@ -129,8 +129,8 @@ func (v *DefaultValidation) Init(dependencies ...validation.Dependency) error {
}

v.Capabilities = c
v.TxValidatorV1_2 = builtin1_2.New(c, sf, d, pe)
v.TxValidatorV1_3 = builtin1_3.New(c, sf, d, pe)
v.TxValidatorV1_2 = v12.New(c, sf, d, pe)
v.TxValidatorV1_3 = v13.New(c, sf, d, pe)

return nil
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ import (
commonerrors "github.com/hyperledger/fabric/common/errors"
"github.com/hyperledger/fabric/core/committer/txvalidator"
. "github.com/hyperledger/fabric/core/handlers/validation/api"
"github.com/hyperledger/fabric/core/handlers/validation/builtin/1.2/mocks"
vmocks "github.com/hyperledger/fabric/core/handlers/validation/builtin/mocks"
"github.com/hyperledger/fabric/core/handlers/validation/builtin/v12/mocks"
"github.com/hyperledger/fabric/protos/common"
"github.com/pkg/errors"
"github.com/stretchr/testify/assert"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Copyright IBM Corp. All Rights Reserved.
SPDX-License-Identifier: Apache-2.0
*/

package builtin1_2
package v12

import (
"bytes"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Copyright IBM Corp. All Rights Reserved.
SPDX-License-Identifier: Apache-2.0
*/
package builtin1_2
package v12

import (
"archive/tar"
Expand Down Expand Up @@ -32,7 +32,7 @@ import (
"github.com/hyperledger/fabric/core/common/privdata"
cutils "github.com/hyperledger/fabric/core/container/util"
"github.com/hyperledger/fabric/core/handlers/validation/api/capabilities"
"github.com/hyperledger/fabric/core/handlers/validation/builtin/1.2/mocks"
"github.com/hyperledger/fabric/core/handlers/validation/builtin/v12/mocks"
"github.com/hyperledger/fabric/core/ledger/kvledger/txmgmt/rwsetutil"
per "github.com/hyperledger/fabric/core/peer"
"github.com/hyperledger/fabric/core/policy"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Copyright IBM Corp. All Rights Reserved.
SPDX-License-Identifier: Apache-2.0
*/

package builtin1_3
package v13

import (
"bytes"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Copyright IBM Corp. All Rights Reserved.
SPDX-License-Identifier: Apache-2.0
*/

package builtin1_3
package v13

import (
"fmt"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Copyright IBM Corp. All Rights Reserved.
SPDX-License-Identifier: Apache-2.0
*/
package builtin1_3
package v13

import (
"archive/tar"
Expand Down Expand Up @@ -33,7 +33,7 @@ import (
"github.com/hyperledger/fabric/core/common/privdata"
cutils "github.com/hyperledger/fabric/core/container/util"
"github.com/hyperledger/fabric/core/handlers/validation/api/capabilities"
"github.com/hyperledger/fabric/core/handlers/validation/builtin/1.3/mocks"
"github.com/hyperledger/fabric/core/handlers/validation/builtin/v13/mocks"
"github.com/hyperledger/fabric/core/ledger/kvledger/txmgmt/rwsetutil"
per "github.com/hyperledger/fabric/core/peer"
"github.com/hyperledger/fabric/core/policy"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Copyright IBM Corp. All Rights Reserved.
SPDX-License-Identifier: Apache-2.0
*/

package builtin1_3
package v13

import (
commonerrors "github.com/hyperledger/fabric/common/errors"
Expand Down

0 comments on commit c417075

Please sign in to comment.