mirror of
https://github.com/hyperledger/fabric-samples.git
synced 2026-06-20 16:45:09 +00:00
Default timeouts for basic Gateway TypeScript sample (#573)
Signed-off-by: Mark S. Lewis <mark_lewis@uk.ibm.com>
This commit is contained in:
parent
0d7fa171d1
commit
3457690148
1 changed files with 13 additions and 0 deletions
|
|
@ -41,6 +41,19 @@ async function main(): Promise<void> {
|
|||
client,
|
||||
identity: await newIdentity(),
|
||||
signer: await newSigner(),
|
||||
// Default timeouts for different gRPC calls
|
||||
evaluateOptions: () => {
|
||||
return { deadline: Date.now() + 5000 }; // 5 seconds
|
||||
},
|
||||
endorseOptions: () => {
|
||||
return { deadline: Date.now() + 15000 }; // 15 seconds
|
||||
},
|
||||
submitOptions: () => {
|
||||
return { deadline: Date.now() + 5000 }; // 5 seconds
|
||||
},
|
||||
commitStatusOptions: () => {
|
||||
return { deadline: Date.now() + 60000 }; // 1 minute
|
||||
},
|
||||
});
|
||||
|
||||
try {
|
||||
|
|
|
|||
Loading…
Reference in a new issue