ethclient: fix tx sender cache miss detection (#23877)

This fixes a bug in TransactionSender where it would return the
zero address for transactions where the sender address wasn't
cached already.

Co-authored-by: Felix Lange <fjl@twurst.com>
This commit is contained in:
Lee Bousfield
2021-11-17 07:44:41 -06:00
committed by GitHub
parent fa96718512
commit 16341e0563
3 changed files with 124 additions and 41 deletions

View File

@@ -233,6 +233,8 @@ func (ec *Client) TransactionSender(ctx context.Context, tx *types.Transaction,
if err == nil {
return sender, nil
}
// It was not found in cache, ask the server.
var meta struct {
Hash common.Hash
From common.Address