• Felix Lange's avatar
    rpc/api: don't crash for unknown blocks · 90cd8ae9
    Felix Lange authored
    Most eth RPC calls that work with blocks crashed when the block was not
    found because they called Hash on a nil block. This is a regression
    introduced in cdc2662c (#1779).
    
    While here, remove the insane conversions in get*CountBy*. There is no
    need to construct a complete BlockRes and converting
    int->int64->*big.Int->[]byte->hexnum->string to format the length of a
    slice as hex.
    90cd8ae9
eth.go 21.6 KB