As there are a couple endiannesses used by Bitcoin, what is the proper way to encode the data parameter for a getmemorypool JSON API call?
Asked
Active
Viewed 143 times
1
ThePiachu
- 42,931
- 25
- 138
- 347
2 Answers
1
Do you mean the data response for a getwork call? Because getmemorypool only returns version, previousblockhash, transactions, coinbasevalue, coinbaseflags, time, mintime, curtime, and bits.
If so, I answered that here.
Chris Moore
- 14,745
- 6
- 65
- 87
-
No, I'm specifically referring to getmemorypool call's `data` field, as in a whole, solved block, rather than just a block header. Maybe I shouldn't have called it "response", but a "parameter". – ThePiachu Feb 26 '12 at 05:37
-
2In that case: it's a byte-per-byte encoding in hex of the serialized block, the same way it would be serialized on disk in blk0001.dat or on the network. – Pieter Wuille Mar 06 '12 at 00:58