diff --git a/api/coreservice_with_height.go b/api/coreservice_with_height.go index 8fe9bcd4fd..3b945181d3 100644 --- a/api/coreservice_with_height.go +++ b/api/coreservice_with_height.go @@ -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() @@ -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)