update getblockbynumber to use same type casting as headerbynumber

This commit is contained in:
Ilan Gitter 2018-10-05 10:43:18 -04:00 committed by Josh Giles
parent 2e8ecf3dc0
commit de06789c9a

View file

@ -191,7 +191,7 @@ func (b *SimulatedBackend) BlockByNumber(ctx context.Context, number *big.Int) (
if number == nil {
return b.blockchain.CurrentBlock(), nil
}
block := b.blockchain.GetBlockByNumber(number.Uint64())
block := b.blockchain.GetBlockByNumber(uint64(number.Int64()))
if block == nil {
return nil, errBlockDoesNotExist
}