Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions api/coreservice_with_height.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ func newCoreServiceWithHeight(cs *coreService, height uint64) *coreServiceReader

func (core *coreServiceReaderWithHeight) Account(addr address.Address) (*iotextypes.AccountMeta, *iotextypes.BlockIdentifier, error) {
if !core.cs.archiveSupported {
return nil, nil, ErrArchiveNotSupported
return core.cs.Account(addr)
}
ctx, span := tracer.NewSpan(context.Background(), "coreServiceReaderWithHeight.Account")
defer span.End()
Expand Down Expand Up @@ -82,7 +82,7 @@ func (core *coreServiceReaderWithHeight) stateAndNonce(addr address.Address) (*s

func (core *coreServiceReaderWithHeight) ReadContract(ctx context.Context, callerAddr address.Address, elp action.Envelope) (string, *iotextypes.Receipt, error) {
if !core.cs.archiveSupported {
return "", nil, ErrArchiveNotSupported
return core.cs.ReadContract(ctx, callerAddr, elp)
}
log.Logger("api").Debug("receive read smart contract request")
exec, ok := elp.Action().(*action.Execution)
Expand Down