Closed
Description
opened on Mar 3, 2020
While I've been writing test cases for the package types
, I stumble upon a couple of small issues with sdk.ChainAnteDecorators()
:
- When the
chain
argument is an empty slice, the function panics. The godoc comment does not mention such a case. - The second
if
clause never evaluatestrue
:Line 33 in 3349c97
Whenlen(chain) == 1
aTerminator
had already been appended in the previousif
block.
Wrt 1, there are two solutions:
- let it panic and mention this case in the documentation
- just fix return
nil
whenlen(chain) == 0
and add a godoc line. This would be an ABI breakage (i.e. a change in function's semantic), though I think it's not a big deal.
For Admin Use
- Not duplicate issue
- Appropriate labels applied
- Appropriate contributors tagged
- Contributor assigned/self-assigned
Activity