Skip to content

Commit

Permalink
Merge pull request #262 from knarayan/main
Browse files Browse the repository at this point in the history
changes to support various hash mechanisms
  • Loading branch information
knarayan authored May 24, 2022
2 parents ae96e46 + 476e0d9 commit 55793db
Show file tree
Hide file tree
Showing 33 changed files with 508 additions and 171 deletions.
1 change: 1 addition & 0 deletions .github/workflows/test_go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ jobs:
working-directory: core/network/fabric-interop-cc/contracts/interop

test_assetmgmt:
if: ${{ false }} # disable for now
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
Expand Down
4 changes: 2 additions & 2 deletions common/protos-go/common/access_control.pb.go

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

4 changes: 2 additions & 2 deletions common/protos-go/common/ack.pb.go

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

287 changes: 182 additions & 105 deletions common/protos-go/common/asset_locks.pb.go

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions common/protos-go/common/asset_transfer.pb.go

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

4 changes: 2 additions & 2 deletions common/protos-go/common/interop_payload.pb.go

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

4 changes: 2 additions & 2 deletions common/protos-go/common/membership.pb.go

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

4 changes: 2 additions & 2 deletions common/protos-go/common/proofs.pb.go

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

4 changes: 2 additions & 2 deletions common/protos-go/common/query.pb.go

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

4 changes: 2 additions & 2 deletions common/protos-go/common/state.pb.go

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

4 changes: 2 additions & 2 deletions common/protos-go/common/verification_policy.pb.go

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

4 changes: 2 additions & 2 deletions common/protos-go/corda/view_data.pb.go

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

4 changes: 2 additions & 2 deletions common/protos-go/driver/driver.pb.go

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

4 changes: 4 additions & 0 deletions common/protos-go/driver/driver_grpc.pb.go

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

4 changes: 2 additions & 2 deletions common/protos-go/fabric/view_data.pb.go

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

4 changes: 2 additions & 2 deletions common/protos-go/networks/networks.pb.go

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

4 changes: 4 additions & 0 deletions common/protos-go/networks/networks_grpc.pb.go

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

4 changes: 2 additions & 2 deletions common/protos-go/relay/datatransfer.pb.go

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

4 changes: 4 additions & 0 deletions common/protos-go/relay/datatransfer_grpc.pb.go

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

15 changes: 11 additions & 4 deletions common/protos/common/asset_locks.proto
Original file line number Diff line number Diff line change
Expand Up @@ -19,18 +19,25 @@ message AssetClaim {
bytes claimInfo = 2;
}

enum HashMechanism {
SHA256 = 0;
SHA512 = 1;
}

message AssetLockHTLC {
bytes hashBase64 = 1;
uint64 expiryTimeSecs = 2;
HashMechanism hashMechanism = 1;
bytes hashBase64 = 2;
uint64 expiryTimeSecs = 3;
enum TimeSpec {
EPOCH = 0;
DURATION = 1;
}
TimeSpec timeSpec = 3;
TimeSpec timeSpec = 4;
}

message AssetClaimHTLC {
bytes hashPreimageBase64 = 1;
HashMechanism hashMechanism = 1;
bytes hashPreimageBase64 = 2;
}

message AssetExchangeAgreement {
Expand Down
2 changes: 1 addition & 1 deletion core/network/fabric-interop-cc/contracts/interop/Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
assetexchange:
cp -r ../../libs/assetexchange .
test-manage-assets: assetexchange
go test manage_assets.go manage_assets_test.go main.go setup_test.go -v
go test manage_assets.go manage_assets_test.go main.go -v
clean:
rm -rf assetexchange
build-local:
Expand Down
Loading

0 comments on commit 55793db

Please sign in to comment.