Skip to content

Commit

Permalink
new access API
Browse files Browse the repository at this point in the history
  • Loading branch information
bluesign committed Jul 14, 2023
1 parent f9a978d commit 9d1db68
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
4 changes: 1 addition & 3 deletions storage/remote/store_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -107,14 +107,12 @@ func (a testClient) GetEvents(ctx context.Context, in *archive.GetEventsRequest,
}

func (a testClient) GetRegisterValues(ctx context.Context, in *archive.GetRegisterValuesRequest, opts ...grpc.CallOption) (*archive.GetRegisterValuesResponse, error) {
val, ok := a.registerMap[hex.EncodeToString(in.Paths[0])]
val, ok := a.registerMap[hex.EncodeToString(in.Registers[0])]
if !ok {
return nil, fmt.Errorf("register not found in test fixture")
}

return &archive.GetRegisterValuesResponse{
Height: in.Height,
Paths: in.Paths,
Values: [][]byte{val},
}, nil
}
Expand Down
3 changes: 2 additions & 1 deletion storage/sqlite/store.go
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,8 @@ func (s *Store) SupportSnapshotsWithCurrentConfig() bool {
}

func (s *Store) GetBytes(ctx context.Context, store string, key []byte) ([]byte, error) {
return s.GetBytesAtVersion(ctx, store, key, 0)
v, err := s.GetBytesAtVersion(ctx, store, key, 0)
return v, err
}

func (s *Store) SetBytes(ctx context.Context, store string, key []byte, value []byte) error {
Expand Down

0 comments on commit 9d1db68

Please sign in to comment.