Bitcoin Forum
May 06, 2024, 04:30:24 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: What is wrong with this JavaScript code ?  (Read 568 times)
Cryptolator (OP)
Hero Member
*****
Offline Offline

Activity: 508
Merit: 500



View Profile
February 06, 2014, 08:04:58 PM
 #1

Hi everyone !

What is wrong in this code that always make my IP banned from blockchain.info ?

http://pastebin.com/TPFiiygQ

Thanks for your help ! Smiley
1715013024
Hero Member
*
Offline Offline

Posts: 1715013024

View Profile Personal Message (Offline)

Ignore
1715013024
Reply with quote  #2

1715013024
Report to moderator
It is a common myth that Bitcoin is ruled by a majority of miners. This is not true. Bitcoin miners "vote" on the ordering of transactions, but that's all they do. They can't vote to change the network rules.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
olsn
Newbie
*
Offline Offline

Activity: 55
Merit: 0


View Profile
February 06, 2014, 08:22:34 PM
 #2

In line 167 you have a timeout of 100milliseconds, the API states though that you should limit your queries to once every 10 seconds,
you should change the timeout from '100' to '10000' (10000milliseconds -> 10 seconds)

Just to be on the save side, I'd change it to 11000 or 12000

Not sure if that was all, but that's what cought my attention at the first glance Wink - hope this helps!
gogodr
Sr. Member
****
Offline Offline

Activity: 434
Merit: 250



View Profile
February 06, 2014, 08:26:23 PM
 #3

yep, pretty much that.
Also the fact that you don't wait for your request to finish before sending another one.
you can handle GET requests way more easier using Jquery and you can use a callback when you get a response.
That would be a better way to make an asynchronous recursive function like the one you want.
Cryptolator (OP)
Hero Member
*****
Offline Offline

Activity: 508
Merit: 500



View Profile
February 06, 2014, 08:27:25 PM
 #4

In line 167 you have a timeout of 100milliseconds, the API states though that you should limit your queries to once every 10 seconds,
you should change the timeout from '100' to '10000' (10000milliseconds -> 10 seconds)

Just to be on the save side, I'd change it to 11000 or 12000

Not sure if that was all, but that's what cought my attention at the first glance Wink - hope this helps!

Thanks for that, didn't know about the 10 seconds minimum for queries. I changed it for 12 sec like you said. Might be it ! Smiley

Thanks again ! Smiley
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!