diff --git a/hmy/api_backend.go b/hmy/api_backend.go index 917438a8b..ad88f0e8f 100644 --- a/hmy/api_backend.go +++ b/hmy/api_backend.go @@ -112,9 +112,11 @@ func (b *APIBackend) GetReceipts(ctx context.Context, hash common.Hash) (types.R } // EventMux ... +// TODO: this is not implemented or verified yet for harmony. func (b *APIBackend) EventMux() *event.TypeMux { return b.hmy.eventMux } // BloomStatus ... +// TODO: this is not implemented or verified yet for harmony. func (b *APIBackend) BloomStatus() (uint64, uint64) { sections, _, _ := b.hmy.bloomIndexer.Sections() return params.BloomBitsBlocks, sections @@ -128,53 +130,63 @@ func (b *APIBackend) ProtocolVersion() int { // Filter related APIs // GetLogs ... +// TODO: this is not implemented or verified yet for harmony. func (b *APIBackend) GetLogs(ctx context.Context, blockHash common.Hash) ([][]*types.Log, error) { // TODO(ricl): implement return nil, nil } // HeaderByHash ... +// TODO: this is not implemented or verified yet for harmony. func (b *APIBackend) HeaderByHash(ctx context.Context, blockHash common.Hash) (*types.Header, error) { // TODO(ricl): implement return nil, nil } // ServiceFilter ... +// TODO: this is not implemented or verified yet for harmony. func (b *APIBackend) ServiceFilter(ctx context.Context, session *bloombits.MatcherSession) { // TODO(ricl): implement } -// SubscribeNewTxsEvent ... +// SubscribeNewTxsEvent subcribes new tx event. +// TODO: this is not implemented or verified yet for harmony. func (b *APIBackend) SubscribeNewTxsEvent(ch chan<- core.NewTxsEvent) event.Subscription { return b.hmy.TxPool().SubscribeNewTxsEvent(ch) } -// SubscribeChainEvent ... +// SubscribeChainEvent subcribes chain event. +// TODO: this is not implemented or verified yet for harmony. func (b *APIBackend) SubscribeChainEvent(ch chan<- core.ChainEvent) event.Subscription { return b.hmy.BlockChain().SubscribeChainEvent(ch) } -// SubscribeChainHeadEvent ... +// SubscribeChainHeadEvent subcribes chain head event. +// TODO: this is not implemented or verified yet for harmony. func (b *APIBackend) SubscribeChainHeadEvent(ch chan<- core.ChainHeadEvent) event.Subscription { return b.hmy.BlockChain().SubscribeChainHeadEvent(ch) } -// SubscribeChainSideEvent ... +// SubscribeChainSideEvent subcribes chain side event. +// TODO: this is not implemented or verified yet for harmony. func (b *APIBackend) SubscribeChainSideEvent(ch chan<- core.ChainSideEvent) event.Subscription { return b.hmy.BlockChain().SubscribeChainSideEvent(ch) } -// SubscribeRemovedLogsEvent ... +// SubscribeRemovedLogsEvent subcribes removed logs event. +// TODO: this is not implemented or verified yet for harmony. func (b *APIBackend) SubscribeRemovedLogsEvent(ch chan<- core.RemovedLogsEvent) event.Subscription { return b.hmy.BlockChain().SubscribeRemovedLogsEvent(ch) } -// SubscribeLogsEvent ... +// SubscribeLogsEvent subcribes log event. +// TODO: this is not implemented or verified yet for harmony. func (b *APIBackend) SubscribeLogsEvent(ch chan<- []*types.Log) event.Subscription { return b.hmy.BlockChain().SubscribeLogsEvent(ch) } -// GetPoolTransactions ... +// GetPoolTransactions returns pool transactions. +// TODO: this is not implemented or verified yet for harmony. func (b *APIBackend) GetPoolTransactions() (types.Transactions, error) { pending, err := b.hmy.txPool.Pending() if err != nil { @@ -187,7 +199,7 @@ func (b *APIBackend) GetPoolTransactions() (types.Transactions, error) { return txs, nil } -// GetBalance ... +// GetBalance returns balance of an given address. func (b *APIBackend) GetBalance(address common.Address) (*hexutil.Big, error) { balance, err := b.hmy.nodeAPI.GetBalanceOfAddress(address) return (*hexutil.Big)(balance), err