common/hexutil: ensure negative big.Int is encoded sensibly

Restricting encoding is silly.
This commit is contained in:
Felix Lange
2017-02-26 19:40:33 +01:00
parent d304da3803
commit 280f08be84
3 changed files with 5 additions and 16 deletions

View File

@ -178,7 +178,7 @@ func EncodeBig(bigint *big.Int) string {
if nbits == 0 {
return "0x0"
}
return fmt.Sprintf("0x%x", bigint)
return fmt.Sprintf("%#x", bigint)
}
func has0xPrefix(input string) bool {