From 1957065af4cb0fe1e327f31e4b0a632a24af5e3d Mon Sep 17 00:00:00 2001 From: Joshua Kim <20001595+joshua-kim@users.noreply.github.com> Date: Tue, 5 Nov 2024 14:56:46 -0500 Subject: [PATCH] embed unsigned chunk Signed-off-by: Joshua Kim <20001595+joshua-kim@users.noreply.github.com> --- x/dsmr/block.go | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/x/dsmr/block.go b/x/dsmr/block.go index ffa353a75e..f9ba8f8f9e 100644 --- a/x/dsmr/block.go +++ b/x/dsmr/block.go @@ -33,12 +33,9 @@ type UnsignedChunk[T Tx] struct { // TODO emit configurable amount of chunks/sec type Chunk[T Tx] struct { - Producer ids.NodeID `serialize:"true"` - Beneficiary codec.Address `serialize:"true"` - Expiry int64 `serialize:"true"` - Txs []T `serialize:"true"` - Signer [bls.PublicKeyLen]byte `serialize:"true"` - Signature [bls.SignatureLen]byte `serialize:"true"` + UnsignedChunk[T] `serialize:"true"` + Signer [bls.PublicKeyLen]byte `serialize:"true"` + Signature [bls.SignatureLen]byte `serialize:"true"` bytes []byte id ids.ID @@ -95,12 +92,9 @@ func newChunk[T Tx]( signature [bls.SignatureLen]byte, ) (Chunk[T], error) { c := Chunk[T]{ - Producer: unsignedChunk.Producer, - Beneficiary: unsignedChunk.Beneficiary, - Expiry: unsignedChunk.Expiry, - Txs: unsignedChunk.Txs, - Signer: signer, - Signature: signature, + UnsignedChunk: unsignedChunk, + Signer: signer, + Signature: signature, } return c, c.init() }