Skip to content

Commit 134ec30

Browse files
authored
fix(ledger): use transactions for leios endorser blocks (#1200)
Since Leios Endorser Blocks do not have the transaction contents in their CBOR representation, we do not have a container for them. Add `transactions` to allow us to store them in the block once resolved for later retrieval, such as via the `Transactions()` func. Signed-off-by: Chris Gianelloni <[email protected]>
1 parent ca6f76e commit 134ec30

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

ledger/leios/leios.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ type LeiosEndorserBlock struct {
6464
cbor.DecodeStoreCbor
6565
cbor.StructAsArray
6666
hash *common.Blake2b256
67+
transactions []common.Transaction
6768
TxReferences []common.TxReference
6869
}
6970

@@ -153,9 +154,7 @@ func (b *LeiosEndorserBlock) PrevHash() common.Blake2b256 {
153154
}
154155

155156
func (b *LeiosEndorserBlock) Transactions() []common.Transaction {
156-
// TODO: convert TxReferences into []Transaction
157-
// TxReferences []common.TxReference
158-
return []common.Transaction{}
157+
return b.transactions
159158
}
160159

161160
func (b *LeiosEndorserBlock) Utxorpc() (*utxorpc.Block, error) {

0 commit comments

Comments
 (0)