Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions ledger/state.go
Original file line number Diff line number Diff line change
Expand Up @@ -995,6 +995,11 @@ func (ls *LedgerState) forgeBlock() {
// Get current chain tip
currentTip := ls.chain.Tip()

// Set Hash if empty
if len(currentTip.Point.Hash) == 0 {
currentTip.Point.Hash = make([]byte, 28)
}

// Calculate next slot and block number
nextSlot, err := ls.TimeToSlot(time.Now())
if err != nil {
Expand Down Expand Up @@ -1175,6 +1180,9 @@ func (ls *LedgerState) forgeBlock() {
return
}

// Add block CBOR to itself for later decode
conwayBlock.SetCbor(blockCbor)

// Log the generated block CBOR (DEBUG level)
ls.config.Logger.Debug(
"forged empty conway block",
Expand Down
Loading