Bitcoin Forum
May 02, 2024, 05:30:47 AM *
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 567 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
Activity + Trust + Earned Merit == The Most Recognized Users on Bitcointalk
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1714627847
Hero Member
*
Offline Offline

Posts: 1714627847

View Profile Personal Message (Offline)

Ignore
1714627847
Reply with quote  #2

1714627847
Report to moderator
1714627847
Hero Member
*
Offline Offline

Posts: 1714627847

View Profile Personal Message (Offline)

Ignore
1714627847
Reply with quote  #2

1714627847
Report to moderator
1714627847
Hero Member
*
Offline Offline

Posts: 1714627847

View Profile Personal Message (Offline)

Ignore
1714627847
Reply with quote  #2

1714627847
Report to moderator
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!