|
Algorithm 1 Cross-chain data circulation |
-
1:
Input:
-
2:
: the set of chains in the cross-chain system
-
3:
: the set of auto agents
-
4:
: the set of AGRobots
-
5:
: the set of cross-chain contracts
-
6:
Output:
-
7:
True or False
-
8:
————————————————————————————————————————
-
9:
1. Propose ( from to ):
-
10:
-
11:
-
12:
-
13:
Broadcast in
-
14:
invoke (Cross-chain broadcast)
-
15:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
16:
2. Cross-chain broadcast:
-
17:
receives
-
18:
if then
-
19:
-
20:
Broadcast in
-
21:
invoke (Response)
-
22:
else
-
23:
Broadcast in
-
24:
return false
-
25:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - – - - - - - - - - - - - - - - - - - - -
-
26:
3. Response ( receives ):
-
27:
if then
-
28:
-
29:
Broadcast in
-
30:
-
31:
Return True
-
32:
else
-
33:
Broadcast in
-
34:
Return False
|