Skip to content

Commit 066667d

Browse files
committed
sim-rs: add TXLost to schema
1 parent afd4b58 commit 066667d

File tree

2 files changed

+26
-1
lines changed

2 files changed

+26
-1
lines changed

data/simulation/trace.rust.d.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ interface CpuTaskFinishedEvent {
4242

4343
type CpuTaskType = shared.CpuTaskType;
4444

45-
type BlockEvent = shared.BlockEvent | LotteryWon | GeneratedTransaction;
45+
type BlockEvent = shared.BlockEvent | LotteryWon | GeneratedTransaction | LostTransaction;
4646

4747
interface LotteryWon {
4848
type: "IBLotteryWon" | "EBLotteryWon" | "VTLotteryWon";
@@ -58,6 +58,12 @@ interface GeneratedTransaction {
5858
size_bytes: number;
5959
}
6060

61+
interface LostTransaction {
62+
type: "TXLost";
63+
id: string;
64+
reason: string;
65+
}
66+
6167
interface NetworkEvent extends Omit<shared.NetworkEvent, "type"> {
6268
type: NetworkEventType
6369
}

data/simulation/trace.rust.schema.json

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -291,6 +291,22 @@
291291
],
292292
"type": "object"
293293
},
294+
"LostTransaction": {
295+
"properties": {
296+
"id": {
297+
"type": "string"
298+
},
299+
"reason": {
300+
"type": "string"
301+
},
302+
"type": {
303+
"const": "TXLost",
304+
"type": "string"
305+
}
306+
},
307+
"required": ["id", "reason", "type"],
308+
"type": "object"
309+
},
294310
"LotteryWon": {
295311
"properties": {
296312
"id": {
@@ -403,6 +419,9 @@
403419
{
404420
"$ref": "#/definitions/GeneratedTransaction"
405421
},
422+
{
423+
"$ref": "#/definitions/LostTransaction"
424+
},
406425
{
407426
"$ref": "#/definitions/NetworkEvent"
408427
},

0 commit comments

Comments
 (0)