Subscribe return null_hash
chinqi opened this issue · 8 comments
When I use pylibbitcoin to subscribe address, there was data end with tx hash. after few minutes later then return a lots of zero which means null_hash I think, I didn't receive any data after that, why is that? Should I config something in bs?
Hi @zhci - pylibbitcoin is a contrib library, not maintained AFAIK. What is the response via bx?
Hello @evoskuil I used bx watch-address command with option -d 2000, it will monitor about half of an hour, I got the result with sequence+height+hash after transaction has one confirmed, but the console print "connection timed out" after few minutes later, then it will not print anything.
This is expected behavior. 2000 seconds is 33.3 minutes.
Yes, bx will running for 33.3 minutes, after print data normally, it will print "connection timed out" about 20 minutes later, and then it seems not work any more, whatever I send coin to the watching address, bx didn't print anything.
@zhci Which server are you using to do the subscription? If you run your own, don't forget to configure the subscription_expiration_minutes
parameter (https://github.com/libbitcoin/libbitcoin-server/blob/master/data/bs.cfg#L258). Subscriptions do consume server resources, so some configuration is required. Even if you set the client side to wait for a time larger than that, the server can time you out.
I changed my config file and solved this problem, thanks @thecodefactory @evoskuil
Note that a client may resubscribe before losing the subscription, which results in a renewal. Bx doesn’t do this.