Merge pull request #172 from tn606024/fix-get-block

fix: delete check empty tx root hash
This commit is contained in:
Sandeep Sreenath 2022-04-20 16:21:22 +05:30 committed by GitHub
commit a9fd4385b3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -133,9 +133,6 @@ func (ec *Client) getBlock(ctx context.Context, method string, args ...interface
if head.UncleHash != types.EmptyUncleHash && len(body.UncleHashes) == 0 {
return nil, fmt.Errorf("server returned empty uncle list but block header indicates uncles")
}
if head.TxHash == types.EmptyRootHash && len(body.Transactions) > 0 {
return nil, fmt.Errorf("server returned non-empty transaction list but block header indicates no transactions")
}
if head.TxHash != types.EmptyRootHash && len(body.Transactions) == 0 {
return nil, fmt.Errorf("server returned empty transaction list but block header indicates transactions")
}