Merge branch 'master' into sbansal/nonce-coordination-and-consensus-for-chain-nodes

This commit is contained in:
Shrenuj Bansal
2022-10-17 22:55:48 -04:00
53 changed files with 1238 additions and 663 deletions
+7
View File
@@ -2,6 +2,7 @@ package common
import (
"context"
"time"
"github.com/gbrlsnchs/jwt/v3"
"github.com/google/uuid"
@@ -26,6 +27,8 @@ type CommonAPI struct {
Alerting *alerting.Alerting
APISecret *dtypes.APIAlg
ShutdownChan dtypes.ShutdownChan
Start dtypes.NodeStartTime
}
type jwtPayload struct {
@@ -91,3 +94,7 @@ func (a *CommonAPI) Session(ctx context.Context) (uuid.UUID, error) {
func (a *CommonAPI) Closing(ctx context.Context) (<-chan struct{}, error) {
return make(chan struct{}), nil // relies on jsonrpc closing
}
func (a *CommonAPI) StartTime(context.Context) (time.Time, error) {
return time.Time(a.Start), nil
}