coredb: tracking fixes (#2476)

This commit is contained in:
Jacek Sieka 2024-07-12 13:40:13 +02:00 committed by GitHub
parent 70682cd4a8
commit d07540766f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 6 additions and 9 deletions

View File

@ -670,7 +670,7 @@ proc slotFetch*(
err(rc.error.toError $api)
acc.ifTrackNewApi:
debug newApiTxt, api, elapsed, accPath=accPath.toStr,
slot=slot.toStr, result
stoPath=stoPath.toStr, result
proc slotDelete*(
acc: CoreDbAccRef;
@ -691,7 +691,7 @@ proc slotDelete*(
err(rc.error.toError $api)
acc.ifTrackNewApi:
debug newApiTxt, api, elapsed, accPath=accPath.toStr,
slot=slot.toStr, result
stoPath=stoPath.toStr, result
proc slotHasPath*(
acc: CoreDbAccRef;
@ -708,7 +708,7 @@ proc slotHasPath*(
err(rc.error.toError $api)
acc.ifTrackNewApi:
debug newApiTxt, api, elapsed, accPath=accPath.toStr,
slot=slot.toStr, result
stoPath=stoPath.toStr, result
proc slotMerge*(
acc: CoreDbAccRef;
@ -726,7 +726,7 @@ proc slotMerge*(
err(rc.error.toError $api)
acc.ifTrackNewApi:
debug newApiTxt, api, elapsed, accPath=accPath.toStr,
slot=slot.toStr, result
stoPath=stoPath.toStr, result
proc slotState*(
acc: CoreDbAccRef;

View File

@ -123,7 +123,7 @@ func toStr*(w: openArray[byte]): string =
func toStr*(w: set[CoreDbCaptFlags]): string =
"Flags[" & $w.len & "]"
proc toStr*(rc: CoreDbRc[int]): string =
proc toStr*(rc: CoreDbRc[int]|CoreDbRc[UInt256]): string =
if rc.isOk: "ok(" & $rc.value & ")" else: "err(" & rc.error.toStr & ")"
proc toStr*(rc: CoreDbRc[bool]): string =
@ -136,10 +136,7 @@ proc toStr*(rc: CoreDbRc[Blob]): string =
if rc.isOk: "ok(Blob[" & $rc.value.len & "])"
else: "err(" & rc.error.toStr & ")"
proc toStr*(rc: CoreDbRc[Hash256]): string =
if rc.isOk: "ok(" & rc.value.toStr & ")" else: "err(" & rc.error.toStr & ")"
proc toStr*(rc: CoreDbRc[set[CoreDbCaptFlags]]): string =
proc toStr*[T](rc: CoreDbRc[T]): string =
if rc.isOk: "ok(" & rc.value.toStr & ")" else: "err(" & rc.error.toStr & ")"
proc toStr*(rc: CoreDbRc[Account]): string =