Closed brennanjl closed 1 day ago
Once this is good to go, I will cherry-pick to main and v0.9. I did it here first because it's at the request of @sapience who is still on preview (v0.8+)
I'm not familiar with this part of the code, just a question since @charithabandi told me before we already have height/timestamp already in the block header, why don't we just use what's already in the block header?
I'm not familiar with this part of the code, just a question since @charithabandi told me before we already have height/timestamp already in the block header, why don't we just use what's already in the block header?
This is sorta doing just that, although a little roundabout. svc.engine.Procedure
could set internally if these fields are -1 or unset, as an alternative. I don't know if that's better or easier though.
Only alternative that comes to mind is that usersvc.(*Service).Call
could do:
stat, _ := svc.chainClient.Status(ctx)
height, stamp := stat.Sync.BestBlockHeight, stat.Sync.BestBlockTime
Does that work? I haven't digested the need for the committed vs uncommitted in the current approach.
Closed in favor of https://github.com/kwilteam/kwil-db/pull/1094
Sets the current block and block timestamp to the most recently seen block if in a
call
.