@@ -229,6 +229,15 @@ func TestDAHintStorageHeader(t *testing.T) {
229229 require .Equal (t , signedHeader .Hash (), h .Hash ())
230230 require .Equal (t , daHeight , h .DAHint ())
231231
232+ // Persist header to underlying store so it survives restart
233+ // (WriteToStoreAndBroadcast only writes to P2P pending cache)
234+ data := & types.Data {Metadata : & types.Metadata {Height : signedHeader .Height ()}}
235+ batch , err := evStore .NewBatch (ctx )
236+ require .NoError (t , err )
237+ require .NoError (t , batch .SaveBlockData (signedHeader , data , & signedHeader .Signature ))
238+ require .NoError (t , batch .SetHeight (signedHeader .Height ()))
239+ require .NoError (t , batch .Commit ())
240+
232241 _ = p2pClient .Close ()
233242 _ = headerSvc .Stop (ctx )
234243 cancel ()
@@ -321,6 +330,14 @@ func TestDAHintStorageData(t *testing.T) {
321330 require .Equal (t , data .Hash (), d .Hash ())
322331 require .Equal (t , daHeight , d .DAHint ())
323332
333+ // Persist data to underlying store so it survives restart
334+ // (WriteToStoreAndBroadcast only writes to P2P pending cache)
335+ batch , err := evStore .NewBatch (ctx )
336+ require .NoError (t , err )
337+ require .NoError (t , batch .SaveBlockData (signedHeader , & data , & signedHeader .Signature ))
338+ require .NoError (t , batch .SetHeight (signedHeader .Height ()))
339+ require .NoError (t , batch .Commit ())
340+
324341 _ = p2pClient .Close ()
325342 _ = dataSvc .Stop (ctx )
326343 cancel ()
0 commit comments