@@ -132,16 +132,16 @@ type SyncProgressBackend interface {
132132 BlockMetadataByNumber (ctx context.Context , blockNum uint64 ) (common.BlockMetadata , error )
133133}
134134
135- func createRegisterAPIBackend (backend * Backend , filterConfig filters.Config , fallbackClientUrl string , fallbackClientTimeout time.Duration , archiveRedirects []BlockRedirectConfig ) (* filters.FilterSystem , error ) {
135+ func createRegisterAPIBackend (backend * Backend , filterConfig filters.Config , fallbackClientUrl string , fallbackClientTimeout time.Duration , archiveRedirects []BlockRedirectConfig ) (* filters.FilterSystem , ReceiptFetcher , error ) {
136136 fallbackClient , err := CreateFallbackClient (fallbackClientUrl , fallbackClientTimeout , false )
137137 if err != nil {
138- return nil , err
138+ return nil , nil , err
139139 }
140140 var archiveClientsManager * archiveFallbackClientsManager
141141 if len (archiveRedirects ) != 0 {
142142 archiveClientsManager , err = newArchiveFallbackClientsManager (archiveRedirects )
143143 if err != nil {
144- return nil , err
144+ return nil , nil , err
145145 }
146146 }
147147 backend .apiBackend = & APIBackend {
@@ -150,8 +150,9 @@ func createRegisterAPIBackend(backend *Backend, filterConfig filters.Config, fal
150150 archiveClientsManager : archiveClientsManager ,
151151 }
152152 filterSystem := filters .NewFilterSystem (backend .apiBackend , filterConfig )
153- backend .stack .RegisterAPIs (backend .apiBackend .GetAPIs (filterSystem ))
154- return filterSystem , nil
153+ apis , receiptFetcher := backend .apiBackend .GetAPIs (filterSystem )
154+ backend .stack .RegisterAPIs (apis )
155+ return filterSystem , receiptFetcher , nil
155156}
156157
157158func (a * APIBackend ) SetSyncBackend (sync SyncProgressBackend ) error {
@@ -162,8 +163,8 @@ func (a *APIBackend) SetSyncBackend(sync SyncProgressBackend) error {
162163 return nil
163164}
164165
165- func (a * APIBackend ) GetAPIs (filterSystem * filters.FilterSystem ) []rpc.API {
166- apis := ethapi .GetAPIs (a )
166+ func (a * APIBackend ) GetAPIs (filterSystem * filters.FilterSystem ) ( []rpc.API , ReceiptFetcher ) {
167+ apis , transactionAPI := ethapi .GetAPIs (a )
167168
168169 apis = append (apis , rpc.API {
169170 Namespace : "eth" ,
@@ -195,7 +196,7 @@ func (a *APIBackend) GetAPIs(filterSystem *filters.FilterSystem) []rpc.API {
195196
196197 apis = append (apis , tracers .APIs (a )... )
197198
198- return apis
199+ return apis , transactionAPI
199200}
200201
201202func (a * APIBackend ) BlockChain () * core.BlockChain {
0 commit comments