very nice.
can a rich list be incorporated into it?
would be nice...
I don't know how, but if someone tells me I'll try to add a rich list.
You need to use
https://github.com/znort987/blockparser
Once modified to use TRK (changes should be similar to what you had to do with the explorer) and compiled you do something like
./blockparser/parser allBalances --limit 100
to get top 100 addresses.
Thanks for the pointers! I'll attempt to add this today.
EDIT: In parser.cpp, I tried changing coinName to "/.Truckcoin/", and changing the var called "expected" to the Truckcoin magic, but I'm missing something because now it segfaults here: if(likely(0!=block->data)) {
For some reason that I can't seem to figure out, in static void findLongestChain(), gMaxBlock is null when assigned to Block *block, and then in the next if statement we dereference block, causing segfault...
I can't make much sense of this code, it seems overly complicated. Does anyone know what else I should try to get it to work?
EDIT2: Rich list seems hard to do, if it was easy then I'm sure more coins would have it by now. Without help I'll not be able to figure out how to add it, but the good news:
Block explorer is on this domain now: http://trk.cryptospread.com:2750/Dev, can you please add it to the OP?
I computed the richlist of a scrypt coin just for testing a month ago. Not sure if x11 coins are treated different in blockparser ... I don't have time right now to try to use the blockparser.
Have you changed also util.cpp and util.h? (variable data line 432 in util.cpp and variable type line 259 in util.h). You have to change them to recognize TRK addresses. If you don't find the variables, search for LITECOIN in these files.
Thanks again, I hadn't looked in those files, will attempt the rich list again.
EDIT: I tried updating those files for Truckcoin. When I try to run the parser I get this error before segfault:
end of map, reason : magic is fucked 11479622 away from EOF
EDIT2: When I reverse the magic bytes I get a bit further:
I get tons of these warnings before segfault at the same line:
warning: at depth 0 in chain, failed to locate parent block 0000000001065e1419d55cbf1f4d1edeb027853df31ea242db796cacac5cad56
What exactly am I supposed to put for uint8_t type and uint8_t data[]; ?
These parent blocks that it can't seem to locate appear to be valid blocks that show in the block explorer...
I'm giving up on a rich list for now because I don't understand the code of these parsers, and it has to be changed both for X11 support as well as specifically for truckcoin.