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,
|
"lastProcessedBlock": 693765,
|
||||||
"chainHeight": 2194250,
|
"chainHeight": 2196052,
|
||||||
"lastUpdate": "2026-03-24T09:44:16.862Z",
|
"lastUpdate": "2026-03-27T02:04:05.929Z",
|
||||||
"totalAddresses": 0
|
"totalAddresses": 0
|
||||||
}
|
}
|
||||||
@@ -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 });
|
||||||
|
|||||||
Reference in New Issue
Block a user