eth, les: Add Backend API

This commit is contained in:
CocoaHuke 2018-06-22 01:13:37 -07:00
parent f82d6c8336
commit 6501c1917c
No known key found for this signature in database
GPG key ID: E300819C1AE33223
2 changed files with 9 additions and 0 deletions

View file

@ -17,6 +17,7 @@
package eth
import (
"errors"
"context"
"math/big"
@ -227,3 +228,7 @@ func (b *EthAPIBackend) ServiceFilter(ctx context.Context, session *bloombits.Ma
go session.Multiplex(bloomRetrievalBatch, bloomRetrievalWait, b.eth.bloomRequests)
}
}
func (b *EthAPIBackend) TxStatusByHash(ctx context.Context, hash common.Hash) (core.TxStatus, error) {
return core.TxStatusUnknown, errors.New("Not Support")
}

View file

@ -197,3 +197,7 @@ func (b *LesApiBackend) ServiceFilter(ctx context.Context, session *bloombits.Ma
go session.Multiplex(bloomRetrievalBatch, bloomRetrievalWait, b.eth.bloomRequests)
}
}
func (b *LesApiBackend) TxStatusByHash(ctx context.Context, hash common.Hash) (core.TxStatus, error) {
return light.GetTxStatus(ctx, b.eth.odr, hash)
}