From cc97943f858340a78caa56af7d4ab39185b21c57 Mon Sep 17 00:00:00 2001 From: Emanuel Pargov Date: Tue, 30 Jul 2024 16:01:26 +0300 Subject: [PATCH] Add preimage struct --- 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 a7eb69a1..792fdc77 100644 --- a/internal/block/block.go +++ b/internal/block/block.go @@ -9,4 +9,5 @@ type Block struct { // Extrinsic represents the block extrinsic data type Extrinsic struct { ET []*TicketProof + EP *PreimageExtrinsic } diff --git a/internal/block/preimage.go b/internal/block/preimage.go new file mode 100644 index 00000000..db246d5c --- /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