Commit graph

2 commits

Author SHA1 Message Date
r2roC
59e1e47bd0 Update asset_transfer_ledger_chaincode.go
Small off-by-1 bug fix.

Signed-off-by: r2roC <arturo@IBM.com>

run fabcar go  (#232)

* add go/runfabcar.sh

Signed-off-by: Acmefocus <107723772@qq.com>

* add set hosts and env in go

Signed-off-by: Acmefocus <107723772@qq.com>

* Update fabcar/startFabric.sh

Co-authored-by: Sijo Cherian <sijocherian@users.noreply.github.com>
Signed-off-by: Acmefocus <107723772@qq.com>

* Update startFabric.sh

delete  set  /etc/hosts

Signed-off-by: Acmefocus <107723772@qq.com>

* add environment variable DISCOVERY_AS_LOCALHOST

Signed-off-by: Acmefocus <107723772@qq.com>

Co-authored-by: Sijo Cherian <sijocherian@users.noreply.github.com>

Fix asset transfer go chaincode functions for
CreateAsset and UpdateAsset.

Signed-off-by: Chris Gabriel <chris_gabriel_98@yahoo.com>

Add param types.

Signed-off-by: Chris Gabriel <chris_gabriel_98@yahoo.com>

Update smartcontract.go and smartcontract_test.go

Signed-off-by: Chris Gabriel <chris_gabriel_98@yahoo.com>
2020-07-11 10:59:39 -05:00
Brett Logan
426cdf1f98 Add Tests and Mocks To Asset Transfer Chaincode
Many users raise questions on how to test chaincode. It used
to be much easier with the old shim, as they could directly
use the old mock stub in the shim. Now that it no longer exists
the fabcar example can provide an example of how to test chaincode.

Also worth noting is our current directory structure of our Go
chaincodes prevents the creation of mocks due to import cycles.
This change also pushes the chaincode logic down into a `chaincode`
package.

Signed-off-by: Brett Logan <brett.t.logan@ibm.com>
2020-07-10 05:59:22 -04:00