P2PoolExtendedFrontEnd icon indicating copy to clipboard operation
P2PoolExtendedFrontEnd copied to clipboard

Share Found in Last Hour

Open zaw9c1 opened this issue 11 years ago • 3 comments

I just found this string " "my_share_counts_in_last_hour": {"doa_stale_shares": 0, "stale_shares": 0, "orphan_stale_shares": 0, "shares": 0, "unstale_shares": 0}" in http://127.0.0.1:9171/local_stats

Which I found very useful tool to see how's your node is doing by the hour.

d3.select("#share_hour").text(n.my_share_counts_in_last_hour.unstale_shares);

Index.html

I just wondering if you would implant that on your front end?

zaw9c1 avatar Feb 10 '14 23:02 zaw9c1

Hi, First of all thanks for your work :)

Now my request : Is it possible to just show nod shares from the last 12 hours ? - Including the adress in the overview who found it ? - So people could control if they are still in the payroll easier... Like : Node shares: Workeraddress (time) - b5e56edf - share dif -

derubm avatar Feb 18 '14 20:02 derubm

I think simple as changing the lookbehind value of line 116 of web.py from 3600 to 43200 will give you 12hr.

3200 sec in 1hr , 43200 sec in 12hr I'll give it a try on my node and see.

zaw9c1 avatar Feb 18 '14 23:02 zaw9c1

open up web.py with notepad++ or other code editor.

Goto line line 120 add this below that statement.

my_unstale_count12hr = sum(1 for share in node.tracker.get_chain(node.best_share_var.value, lookbehind * 12 ) if share.hash in wb.my_share_hashes)

Than add

unstale_shares12hr=my_unstale_count12,

in this bracket

my_share_counts_in_last_hour=dict(

don't use indent, uses spaces. now you soulld have new json information show up in /local_stats

zaw9c1 avatar Feb 19 '14 02:02 zaw9c1