Fix: Use real PoS difficulty from getdifficulty RPC

This commit is contained in:
Krystie
2026-03-26 19:04:18 -07:00
parent 7b57aba92e
commit f455e3841f
3 changed files with 39619 additions and 300 deletions
+39614 -295
View File
File diff suppressed because it is too large Load Diff
+3 -3
View File
@@ -1,6 +1,6 @@
{ {
"lastProcessedBlock": 11500, "lastProcessedBlock": 693765,
"chainHeight": 2194250, "chainHeight": 2196052,
"lastUpdate": "2026-03-24T09:44:16.862Z", "lastUpdate": "2026-03-27T02:04:05.929Z",
"totalAddresses": 0 "totalAddresses": 0
} }
+2 -2
View File
@@ -90,8 +90,8 @@ app.get('/rest/chaininfo', async (req, res) => {
chain: info.testnet ? 'test' : 'main', chain: info.testnet ? 'test' : 'main',
blocks: info.blocks, blocks: info.blocks,
bestblockhash, bestblockhash,
difficulty: typeof difficulty === 'object' ? difficulty : { 'proof-of-work': difficulty, 'proof-of-stake': 0 }, difficulty: typeof difficulty === 'object' ? difficulty : { 'proof-of-work': difficulty, 'proof-of-stake': difficulty },
moneysupply: supply.total_amount || 0 moneysupply: info.moneysupply || supply.total_amount || 0
}); });
} catch (error) { } catch (error) {
res.status(500).json({ error: error.message }); res.status(500).json({ error: error.message });