The invocation counter records the number of times each contract was invoked in current InvocationTransaction.
Consider that we have an InvocationTransaction with the following Script:
APPCALL <A>
APPCALL <B>
APPCALL <B>
APPCALL <C>
If we call System.Runtime.GetInvocationCounter in each contract, we will get:
1 from APPCALL <A>
1 from the first APPCALL <B>
2 from the second APPCALL <B>
1 from APPCALL <C>
The invocation counter records the number of times each contract was invoked in current
InvocationTransaction.Consider that we have an
InvocationTransactionwith the followingScript:If we call
System.Runtime.GetInvocationCounterin each contract, we will get:1fromAPPCALL <A>1from the firstAPPCALL <B>2from the secondAPPCALL <B>1fromAPPCALL <C>