From de06789c9ab36df40372429eecb86a538b52fb8c Mon Sep 17 00:00:00 2001 From: Ilan Gitter Date: Fri, 5 Oct 2018 10:43:18 -0400 Subject: [PATCH] update getblockbynumber to use same type casting as headerbynumber --- accounts/abi/bind/backends/simulated.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/accounts/abi/bind/backends/simulated.go b/accounts/abi/bind/backends/simulated.go index 76c6aa9ea91f..6945fc8f239f 100644 --- a/accounts/abi/bind/backends/simulated.go +++ b/accounts/abi/bind/backends/simulated.go @@ -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 }