Discussion:
[libtorrent] DHT put/get immutable in python do not wỏk
Trung Thanh Tran
2016-04-26 14:57:32 UTC
Permalink
Hi,
I am trying to use dht_put_immutable_item and dht_get_immutable_item with python wrapper. But it seems that it cannot get data from dht. My source code is in attachment.
Below is result in command line. Please tell me if I miss something.


python put_immutable_example.py
Put immutable: Data salt
DHT put commplete (success=0 hash=86e686d3c2cf1c0d5fc21ed584dd4ccf298ab2e5)
Put is ok
DHT immutable item 86e686d3c2cf1c0d5fc21ed584dd4ccf298ab2e5 [ <uninitialized>
]
Angel Leon
2016-04-26 15:47:40 UTC
Permalink
you missed the attachment.
Post by Trung Thanh Tran
Hi,
I am trying to use dht_put_immutable_item and dht_get_immutable_item with
python wrapper. But it seems that it cannot get data from dht. My source
code is in attachment.
Below is result in command line. Please tell me if I miss something.
python put_immutable_example.py
Put immutable: Data salt
DHT put commplete (success=0 hash=86e686d3c2cf1c0d5fc21ed584dd4ccf298ab2e5)
Put is ok
DHT immutable item 86e686d3c2cf1c0d5fc21ed584dd4ccf298ab2e5 [
<uninitialized>
]
------------------------------------------------------------------------------
Find and fix application performance issues faster with Applications
Manager
Applications Manager provides deep performance insights into multiple
tiers of
your business applications. It resolves application problems quickly and
reduces your MTTR. Get your free trial!
https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
_______________________________________________
Libtorrent-discuss mailing list
https://lists.sourceforge.net/lists/listinfo/libtorrent-discuss
Trung Thanh Tran
2016-04-26 16:11:04 UTC
Permalink
Hi
Ops, it seems that my attachment is unreadable in several mail clients. So, I attach its gist link.
https://gist.github.com/trungthanh-tran/d04266a658d655b9601177f7fcb0d4ff
Please help me debug it
Thanks
Post by Angel Leon
you missed the attachment.
Post by Trung Thanh Tran
Hi,
I am trying to use dht_put_immutable_item and dht_get_immutable_item with
python wrapper. But it seems that it cannot get data from dht. My source
code is in attachment.
Below is result in command line. Please tell me if I miss something.
python put_immutable_example.py
Put immutable: Data salt
DHT put commplete (success=0 hash=86e686d3c2cf1c0d5fc21ed584dd4ccf298ab2e5)
Put is ok
DHT immutable item 86e686d3c2cf1c0d5fc21ed584dd4ccf298ab2e5 [
<uninitialized>
]
------------------------------------------------------------------------------
Find and fix application performance issues faster with Applications
Manager
Applications Manager provides deep performance insights into multiple
tiers of
your business applications. It resolves application problems quickly and
reduces your MTTR. Get your free trial!
https://ad.doubleclick.net/ddm/clk/302982198;130105516;z <https://ad.doubleclick.net/ddm/clk/302982198;130105516;z>
_______________________________________________
Libtorrent-discuss mailing list
https://lists.sourceforge.net/lists/listinfo/libtorrent-discuss <https://lists.sourceforge.net/lists/listinfo/libtorrent-discuss>
------------------------------------------------------------------------------
Find and fix application performance issues faster with Applications Manager
Applications Manager provides deep performance insights into multiple tiers of
your business applications. It resolves application problems quickly and
reduces your MTTR. Get your free trial!
https://ad.doubleclick.net/ddm/clk/302982198;130105516;z <https://ad.doubleclick.net/ddm/clk/302982198;130105516;z>
_______________________________________________
Libtorrent-discuss mailing list
https://lists.sourceforge.net/lists/listinfo/libtorrent-discuss <https://lists.sourceforge.net/lists/listinfo/libtorrent-discuss>
Steven Siloti
2016-04-27 03:48:11 UTC
Permalink
Post by Trung Thanh Tran
Hi
Ops, it seems that my attachment is unreadable in several mail clients. So, I attach its gist link.
https://gist.github.com/trungthanh-tran/d04266a658d655b9601177f7fcb0d4ff
Please help me debug it
Thanks
Post by Trung Thanh Tran
Hi,
I am trying to use dht_put_immutable_item and dht_get_immutable_item with
python wrapper. But it seems that it cannot get data from dht. My source
code is in attachment.
Below is result in command line. Please tell me if I miss something.
python put_immutable_example.py
Put immutable: Data salt
DHT put commplete (success=0 hash=86e686d3c2cf1c0d5fc21ed584dd4ccf298ab2e5)
Put is ok
DHT immutable item 86e686d3c2cf1c0d5fc21ed584dd4ccf298ab2e5 [ <uninitialized>
]
The problem is that you are trying to execute the put/get requests
before router.utorrent.com has been resolved and the DHT bootstrapped
from it. You need to wait for a `dht_bootstrap_alert` before you call
`dht_put_immutable_item`. Since we don't expose the
`dht_bootstrap_alert` class in the python bindings you'll need to use
`alert.what()` to check the alert type.

Loading...