Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

network.fabric: support FPC #207

Merged
merged 2 commits into from
Mar 31, 2022
Merged

network.fabric: support FPC #207

merged 2 commits into from
Mar 31, 2022

Conversation

adecaro
Copy link
Contributor

@adecaro adecaro commented Mar 30, 2022

If the token chaincode is a FPC, then we must pass the token request as an input not via transient.
This, at least, until FPC supports transient: hyperledger/fabric-private-chaincode#666

Signed-off-by: Angelo De Caro [email protected]

Signed-off-by: Angelo De Caro <[email protected]>
@adecaro adecaro requested a review from mbrandenburger March 30, 2022 07:26
@adecaro adecaro self-assigned this Mar 30, 2022
@mbrandenburger
Copy link
Member

I created a follow up PR #208 to allow TCC to extract the tokenRequest from args.

Comment on lines 344 to 360
return chaincode.NewEndorseView(
namespace,
InvokeFunction,
).WithNetwork(
n.n.Name(),
).WithChannel(
n.ch.Name(),
).WithSignerIdentity(
signer,
).WithTransientEntry(
"token_request", requestRaw,
).WithTxID(
fabric.TxID{
Nonce: txID.Nonce,
Creator: txID.Creator,
},
).Endorse(context)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe you missed to remove the transient entry and pass the requestRaw as parameter :)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good catch, fixed :)

@adecaro adecaro changed the title netword.fabric: support FPC network.fabric: support FPC Mar 30, 2022
Signed-off-by: Angelo De Caro <[email protected]>
Copy link
Member

@mbrandenburger mbrandenburger left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM now

@mbrandenburger mbrandenburger changed the base branch from main to fpc-tcc March 31, 2022 09:27
@adecaro adecaro merged commit d7aa69f into fpc-tcc Mar 31, 2022
@adecaro adecaro deleted the f-fpc branch March 31, 2022 10:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants