MCPcopy
hub / github.com/hyperledger/fabric / PackageChaincodeBinary

Function PackageChaincodeBinary

integration/nwo/package.go:22–27  ·  view source on GitHub ↗

PackageChaincodeBinary is a helper function to package an already built chaincode and write it to the location specified by Chaincode.PackageFile.

(c Chaincode)

Source from the content-addressed store, hash-verified

20// an already built chaincode and write it to the location
21// specified by Chaincode.PackageFile.
22func PackageChaincodeBinary(c Chaincode) {
23 file, err := os.Create(c.PackageFile)
24 Expect(err).NotTo(HaveOccurred())
25 defer file.Close()
26 writeTarGz(c, file)
27}
28
29func writeTarGz(c Chaincode, w io.Writer) {
30 gw := gzip.NewWriter(w)

Callers 7

lifecycle_test.goFile · 0.92
gossip_test.goFile · 0.92
discovery_test.goFile · 0.92
e2e_test.goFile · 0.92
acl_test.goFile · 0.92

Calls 3

writeTarGzFunction · 0.85
CreateMethod · 0.65
CloseMethod · 0.65

Tested by

no test coverage detected