File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -219,7 +219,6 @@ func (h *ApiHandler) GetTweakIndexDataByHeight(c *gin.Context) {
219
219
220
220
var serveTweakData = []string {}
221
221
for _ , tweak := range tweakIndex .Data {
222
- common .DebugLogger .Printf ("%x- %d" , tweak .Tweak (), tweak .HighestValue ())
223
222
if tweak .HighestValue () < dustLimit {
224
223
continue
225
224
}
@@ -267,14 +266,19 @@ func (h *ApiHandler) GetSpentOutpointsIndex(c *gin.Context) {
267
266
return
268
267
}
269
268
spentOutpointsIndex , err := dblevel .FetchByBlockHashSpentOutpointIndex (hInv .Hash )
270
- if err != nil {
269
+ if err != nil && ! errors . Is ( err , dblevel. NoEntryErr {}) {
271
270
common .ErrorLogger .Println (err )
272
271
c .JSON (http .StatusInternalServerError , gin.H {
273
- "error" : "could no get spentOutpointsIndex from db " ,
272
+ "error" : "could could not retrieve data from database " ,
274
273
})
275
274
return
276
275
}
277
276
277
+ if err != nil && errors .Is (err , dblevel.NoEntryErr {}) {
278
+ c .JSON (http .StatusOK , []string {})
279
+ return
280
+ }
281
+
278
282
var result struct {
279
283
BlockHash string `json:"block_hash"`
280
284
Data []string `json:"data"`
You can’t perform that action at this time.
0 commit comments