What is the format of the value of a transaction in the litecoin ledger

1

Feeling a little silly here, I can decode the entire rest of the data in the blockchain, but the "value" field of a transaction output makes no sense.

[0,-14,5,42,1,0,0,0] 

This decodes to "50.00000000" but I can't see how.

The remainder of the block decodes correctly, so I am fairly sure I'm looking at the right data. It doesnt seem to be in the same format as the bitcoin value (/10^8)

Zack Newsham

Posted 2015-09-05T08:12:34.180

Reputation: 123

@NickODell I tried that, if I interpret it as a 64 bit big endian I get 15861034, as little endian I get 705032704Zack Newsham 2015-09-05T19:28:42.763

Answers

0

The transaction format was never altered in the clone Tenebrix or its clone Litecoin. The bytes you have posted are correct, and do indeed decode to 50 BTC when read out as an unsigned, little endian, 64 bit integer.

~> python
>>> import struct
>>> struct.unpack("<q","\x00\xF2\x05\x2A\x01\x00\x00\x00")[0]
5000000000

Anonymous

Posted 2015-09-05T08:12:34.180

Reputation: 10 054

Thanks, I was using Java's .getInt() rather than .getLong()Zack Newsham 2015-09-07T08:38:59.793