From d89e21c66b80ba5e5acbc2d1796869a00f0c3a90 Mon Sep 17 00:00:00 2001 From: Emanuel Pargov Date: Tue, 30 Jul 2024 20:56:33 +0300 Subject: [PATCH] Add preimage struct (#25) --- internal/block/block.go | 1 + internal/block/preimage.go | 9 +++++++++ 2 files changed, 10 insertions(+) create mode 100644 internal/block/preimage.go diff --git a/internal/block/block.go b/internal/block/block.go index 78f5c9e..df83577 100644 --- a/internal/block/block.go +++ b/internal/block/block.go @@ -9,5 +9,6 @@ type Block struct { // Extrinsic represents the block extrinsic data type Extrinsic struct { ET []*TicketProof + EP *PreimageExtrinsic ED *DisputeExtrinsic } diff --git a/internal/block/preimage.go b/internal/block/preimage.go new file mode 100644 index 0000000..db246d5 --- /dev/null +++ b/internal/block/preimage.go @@ -0,0 +1,9 @@ +package block + +// PreimageItem represents a single preimage item in the extrinsic +type Preimage struct { + ServiceIndex uint32 + Data []byte +} + +type PreimageExtrinsic []Preimage