Fix: Use real PoS difficulty from getdifficulty RPC
This commit is contained in:
+39614
-295
File diff suppressed because it is too large
Load Diff
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"lastProcessedBlock": 11500,
|
||||
"chainHeight": 2194250,
|
||||
"lastUpdate": "2026-03-24T09:44:16.862Z",
|
||||
"lastProcessedBlock": 693765,
|
||||
"chainHeight": 2196052,
|
||||
"lastUpdate": "2026-03-27T02:04:05.929Z",
|
||||
"totalAddresses": 0
|
||||
}
|
||||
@@ -90,8 +90,8 @@ app.get('/rest/chaininfo', async (req, res) => {
|
||||
chain: info.testnet ? 'test' : 'main',
|
||||
blocks: info.blocks,
|
||||
bestblockhash,
|
||||
difficulty: typeof difficulty === 'object' ? difficulty : { 'proof-of-work': difficulty, 'proof-of-stake': 0 },
|
||||
moneysupply: supply.total_amount || 0
|
||||
difficulty: typeof difficulty === 'object' ? difficulty : { 'proof-of-work': difficulty, 'proof-of-stake': difficulty },
|
||||
moneysupply: info.moneysupply || supply.total_amount || 0
|
||||
});
|
||||
} catch (error) {
|
||||
res.status(500).json({ error: error.message });
|
||||
|
||||
Reference in New Issue
Block a user