Closed nohea closed 5 years ago
can you add link to code (with specific tag or hash) to PR code?
Hi this shows the diff: https://github.com/cryptocoinjs/coininfo/compare/master...nohea:fix-peercoin-network-values
I asked about something like this: https://github.com/cryptocoinjs/coininfo/blob/299bf3b01a70c932772a7149837c1abe1acb2d41/lib/coins/btc.js#L1-L4
OK, got it. I added a comment:
/*
info from:
https://github.com/peercoin/peercoin/blob/master/src/protocol.cpp
*/
OK, i added reference comments for the Peercoin base58, bip44, bip32 values.
FYI - Peercoin v0.7.x (current) is rebased from Bitcoin 0.8.3, which is pre-HD wallet for the core node. So i made references to those sources.
thank you for links, last question: where precision 1e6 located? I see on blockexplorers 1e8 (but last 2 digest always zero)
+ // from src/util.h:static const int64 COIN = 1000000;
per1: 1e6,
The raw transactions need to have 1e6 satoshis per coin, well actually they just use a satoshi integer. So building txs need to know this translation value vs bitcoin 1e8.
However, most block explorer functions use the node's RPC interface, which reports in coins: 0.00000000 format. So no translation needed, but that explains 00 for the 7th and 8th decimal places.
I think there may be a page on block explorers where displaying the tx needs this translation. I modified Iquidus explorer for it before.
FYI- in the future, there may be a desire to also account for whether the coin has "Peercoin tx timestamp" (true/false). And also custom/fixed fee calculations (0.01/kb). But that's beyond the scope of this PR.
Thanks for the quick turnaround!
sorry for delay, published as 4.4.0
The coins/ppc.js has incorrect values. i've corrected them, and filled in a lot more relevant values, based on the btc.js file.
I'm a Peercoin team contributor, and the team discussed fixing it.