• 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
Name
Last commit
Last update
..
api Loading commit data...
codec Loading commit data...
comms Loading commit data...
shared Loading commit data...
useragent Loading commit data...
jeth.go Loading commit data...
xeth.go Loading commit data...