Importing private key / logging in

15 views
Skip to first unread message

Arco Mul

unread,
Apr 14, 2015, 8:20:40 AM4/14/15
to twist...@googlegroups.com
Hi,

Another question regarding the development of the Windows client.

How exactly can I login an existing user? I tried the following way:
- start twisterd.exe and let it download the whole blockchain
- call: addwalletuser arco
- call: importprivkey <privkey> arco

After that I would expect that the call 'getfollowing arco' returns the users I follow. It doesn't though. It returns an empty array. I decided to wait a bit, but they didn't appear at all.

Once I start the default Twister html though, it immediately starts without problems (shows the correct UI and posts) and from then on I can retrieve 'getfollowing'. Looks like the Twister html does something I am not doing, but what? I looked through the source code, but couldn't find anything.

AND some other points which are not blocking for me:
- on Windows cmd.exe I am not managing to set the -datadir=<data dir> option correctly. Whatever path or notation I am using, it always tells me it can find the directory. Anybody an idea about this?
- whenever I call importprivkey while the blockchain is being downloaded/processed the deamon crashes immediately. Is it a bug? Shall I report it on Github?

Regards,
Arco

* the name of the calls might be a bit off, I don't have twisterd.exe here so I am trying to recall them

Arco Mul

unread,
Apr 14, 2015, 2:33:13 PM4/14/15
to twist...@googlegroups.com
Alright, I was too fast asking. I figured out what I was missing by analyzing the network panel in chrome when starting the html. Could have thought of that before, but okay.

As far as I found out this is what you have to do to 'login' an user

- dhtget arco status
Last post or something

- dhtget arco tracker
Not sure what this one returns. Something with followers?

- dhtget arco following1
Returns followers

- follow arco [<followers>]
Follows all the users found in DHT

Maybe it helps someone else :-)

Arco

Miguel Freitas

unread,
Apr 14, 2015, 9:12:28 PM4/14/15
to twist...@googlegroups.com
On Tue, Apr 14, 2015 at 9:20 AM, Arco Mul <arco...@gmail.com> wrote:
How exactly can I login an existing user? I tried the following way:
- start twisterd.exe and let it download the whole blockchain
- call: addwalletuser arco
- call: importprivkey <privkey> arco

After that I would expect that the call 'getfollowing arco' returns the users I follow. It doesn't though. It returns an empty array. I decided to wait a bit, but they didn't appear at all.

Ok, I guess you've figured out already: you must obtain the list of your (public) followings from DHT and then transpose it to twisterd. Adding followers to twisterd is actually what makes it subscribe to each user's torrents.
 
AND some other points which are not blocking for me:
- on Windows cmd.exe I am not managing to set the -datadir=<data dir> option correctly. Whatever path or notation I am using, it always tells me it can find the directory. Anybody an idea about this?

Are you using cygwin port? I have never really figured out how to fix this, cygwin keeps saying that the path is unix format, and it is supposedly to translate to windows/cygwin but afaict it doesn't work.

mingw port seems to work fine though.

 
- whenever I call importprivkey while the blockchain is being downloaded/processed the deamon crashes immediately. Is it a bug? Shall I report it on Github?


yes, crash is always a bug ;-)

regards,

Miguel

Miguel Freitas

unread,
Apr 14, 2015, 9:16:27 PM4/14/15
to twist...@googlegroups.com
On Tue, Apr 14, 2015 at 3:33 PM, Arco Mul <arco...@gmail.com> wrote:
- dhtget arco tracker
Not sure what this one returns. Something with followers?


this is the torrent tracker for your own user. yes, we use it to obtain that strange count of followers. 

in case we ever make a more reliable estimate for the number of followers, the remaining of the code will be the same.

regards,

Miguel

Arco Mul

unread,
Apr 15, 2015, 3:30:56 AM4/15/15
to twist...@googlegroups.com
Regarding the '-datadir=<data dir>' I figured it out. You were right about the cygwin port.

I have to call it like this: "C:\Twister\twisterd.exe ... <other commands> ... -datadir=/c/cygwin/Twister/data"

Quite unexpected, but not very weird ;-)

Arco

--
You received this message because you are subscribed to the Google Groups "twister-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to twister-dev...@googlegroups.com.
To post to this group, send email to twist...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages