common/hexutil: fix EncodeBig, Big.MarshalJSON

The code was too clever and failed to include zeros on a big.Word
boundary.
This commit is contained in:
Felix Lange
2017-01-16 10:20:20 +01:00
parent 01f6f2d741
commit 51f6b6d33f
3 changed files with 4 additions and 13 deletions

View File

@ -46,6 +46,7 @@ var (
{referenceBig("1"), "0x1"},
{referenceBig("ff"), "0xff"},
{referenceBig("112233445566778899aabbccddeeff"), "0x112233445566778899aabbccddeeff"},
{referenceBig("80a7f2c1bcc396c00"), "0x80a7f2c1bcc396c00"},
}
encodeUint64Tests = []marshalTest{