good morning!!!!

Skip to content
Snippets Groups Projects
Unverified Commit f05419f0 authored by Gary Rong's avatar Gary Rong Committed by GitHub
Browse files

les: fix eth_sendTransaction API (#23215)

parent a5e3aa69
No related branches found
No related tags found
No related merge requests found
......@@ -60,8 +60,11 @@ func (b *LesApiBackend) SetHead(number uint64) {
}
func (b *LesApiBackend) HeaderByNumber(ctx context.Context, number rpc.BlockNumber) (*types.Header, error) {
// Return the latest current as the pending one since there
// is no pending notion in the light client. TODO(rjl493456442)
// unify the behavior of `HeaderByNumber` and `PendingBlockAndReceipts`.
if number == rpc.PendingBlockNumber {
return nil, nil
return b.eth.blockchain.CurrentHeader(), nil
}
if number == rpc.LatestBlockNumber {
return b.eth.blockchain.CurrentHeader(), nil
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment