We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The timestamp of each event is calculated on AddSubStatus function:
firefly-transaction-manager/internal/persistence/postgres/txhistory.go
Line 100 in 2175fff
However, the invocation of AddSubStatus function reflects when an event was recorded but not when it occurred.
So the interface will need to change to allow a timestamp to be passed in
The text was updated successfully, but these errors were encountered:
Hey @Chengxuan will it be best implementing the Now() in the firefly-common library to explicitly check for specific timestamps
Now()
func Now(t ...time.Time) *FFTime { var currentTime time.Time if len(t) > 0 { //extracts current time and coverts to UTC currentTime = t[0].UTC() } else { currentTime = time.Now().UTC() } tt := FFTime(currentTime) return &tt }
Currently this is the Now() in the firefly-common library
func Now() *FFTime { t := FFTime(time.Now().UTC()) return &t }
Sorry, something went wrong.
@Philip-21 I feel Now should always return the time that Now function is executed instead of a time that is not now.
Now
To address this issue, we need to move away from the now time at this layer as it's already too late, so this layer would need to take in a timestamp.
now
e.g.
func (p *sqlPersistence) AddSubStatusAction(ctx context.Context, txID string, subStatus apitypes.TxSubStatus, action apitypes.TxAction, info *fftypes.JSONAny, errInfo *fftypes.JSONAny)
becomes
func (p *sqlPersistence) AddSubStatusAction(ctx context.Context, txID string, subStatus apitypes.TxSubStatus, action apitypes.TxAction, info *fftypes.JSONAny, errInfo *fftypes.JSONAny, t *fftypes.FFTime)
alright
Successfully merging a pull request may close this issue.
The timestamp of each event is calculated on AddSubStatus function:
firefly-transaction-manager/internal/persistence/postgres/txhistory.go
Line 100 in 2175fff
However, the invocation of AddSubStatus function reflects when an event was recorded but not when it occurred.
So the interface will need to change to allow a timestamp to be passed in
The text was updated successfully, but these errors were encountered: