fix(rpc): get_proof test fail because block numbers are not high enough (#1239)

* Problem: get_proof test fail because block numbers are not high enough

Solution:
- wait for app block height rather than tendermint block height

* Update tests/integration_tests/test_types.py

* keep get_proof response the same as geth

Co-authored-by: Daniel Burckhardt <daniel.m.burckhardt@gmail.com>
This commit is contained in:
yihuang
2022-08-12 13:20:17 +02:00
committed by GitHub
co-authored by Daniel Burckhardt
parent 989192028f
commit 94cab52ca1
3 changed files with 22 additions and 6 deletions
+2 -3
View File
@@ -44,9 +44,8 @@ func (b *Backend) GetProof(address common.Address, storageKeys []string, blockNr
height := blockNum.Int64()
_, err = b.GetTendermintBlockByNumber(blockNum)
if err != nil {
// Get 'latest' proof if query is in the future
// this imitates geth behavior
height = 0
// the error message imitates geth behavior
return nil, errors.New("header not found")
}
ctx := rpctypes.ContextWithHeight(height)