Skip to content

Commit

Permalink
Fix. (#2128)
Browse files Browse the repository at this point in the history
Co-authored-by: StefanIliev545 <[email protected]>
  • Loading branch information
StefanIliev545 and StefanIliev545 authored Nov 6, 2024
1 parent 9618a79 commit 883ca07
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions go/enclave/system/hooks.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,14 +79,14 @@ func (s *systemContractCallbacks) Load() error {
return fmt.Errorf("failed fetching batch %w", err)
}

if len(batch.Transactions) < 2 {
if len(batch.Transactions) < 1 {
s.logger.Error("Load: Genesis batch does not have enough transactions", "batchSeqNo", batchSeqNo, "transactionCount", len(batch.Transactions))
return fmt.Errorf("genesis batch does not have enough transactions")
}

receipt, err := s.storage.GetFilteredInternalReceipt(context.Background(), batch.Transactions[1].Hash(), nil, true)
receipt, err := s.storage.GetFilteredInternalReceipt(context.Background(), batch.Transactions[0].Hash(), nil, true)
if err != nil {
s.logger.Error("Load: Failed fetching receipt", "transactionHash", batch.Transactions[1].Hash().Hex(), "error", err)
s.logger.Error("Load: Failed fetching receipt", "transactionHash", batch.Transactions[0].Hash().Hex(), "error", err)
return fmt.Errorf("failed fetching receipt %w", err)
}

Expand Down

0 comments on commit 883ca07

Please sign in to comment.