回答 @yuxi 关于get_followers 的问题

in #cn7 years ago

中文区网友发了一篇文章,介绍Python piston库

并在其中提出了几个问题。

问题之一:

在查看粉丝的时候,如果某人关注了你,又取消了关注,为什么他/她还会出现在粉丝列表里?

问题之二:

程序获取的Voting Power 很低,为何给别人投票后反而会涨,然后投票会降?

昨天我在他帖子中回复的第二个问题,第一个问题因为需要测试,没有直接回答

get_followers 问题没法重现

很抱歉,才抽出时间测试
经过我的测试,没法重现你帖子中描述的问题


测试之前我有1405个关注者


获取关注者数量,让某人取消关注后再次获取,让某人重新关注后再次获取
从数量上看没有错,我把名单显示出来也没有错

我看了一下steem python 库 以及 piston 库,两者的实现是一样的
都是封装并调用以下两个API

  • get_followers
  • get_following

steem中两个API定义如下:

vector< follow_api_obj > get_followers( string to, string start, follow_type type, uint16_t limit )const;
vector< follow_api_obj > get_following( string from, string start, follow_type type, uint16_t limit )const;

我这没法重现你说的问题,建议你重新测试一下
如果还存在,建议提供你的详细代码以及重现步骤

其它

关于Voting Power 问题我已经解答了,就不再赘述了。

Python 库推荐大家用官网的
官网的库是复制piston并经过重构的,更易读
并且HF18后很多新功能,piston里是不支持的

  • piston_lib上次更新时间: Latest commit cb94d72 on May 15
  • 官网Python库上次更新时间: Latest commit 93ac4db on Jun 24

该如何选择,大家已经有了决定了吧?

Sort:  

我在steemit网站注意到了同样的问题。
我停止跟随用户。 后来我看到用户的帖子还在我的饲料上。 我没有从该用户那里得到任何更多的帖子。 那么以后呢,所有的帖子都没有了,不再列在我关注的人的列表中。
我认为这是steemit或blockchain上的缓存问题。 我不认为这是一个大问题。 它也可能是一个尚未完成的块优先级低优先级的事务。

由Google翻译

I noticed the same problem in the steemit site.
I stopped following a user. Later, I saw the post from the user was still on my feed. I did not get any more posts from that user. Then, later, all posts were gone and no longer listed in my list of who I am following.
I think it is a cache issue on steemit or on the blockchain. I don't think it is a big problem. It could also be a low priority transaction on the blockchain that has not been completed.

Translated by Google

Thank you for the information.

以下是一些其他信息。 我开始跟随一个人,很多很多帖子都在我的饲料上。 所有这些帖子都是我刚开始跟随的同一个人。 他们来自几天前。 所以,像我怀疑的,home(feed)页面是某种缓存,像一个列表一样被填充,我不认为列表被更新(或者当你停止下载时被删除)。

由Google翻译

Here's some additional information. I started following a person and many, many posts came on my feed. All these posts were from the same person that I just started following. They were from several days ago. So, as I suspected, the home (feed) page is some sort of cache that gets populated like a list and I don't think the list is updated (or deleted when you stop following).

Translated by Google

.

good post~
thanks!

我在清理following用户,清完了还在,非得用mute才不显示, 应该属程序问题

你说的应该是UI的问题
可能是缓存啥的

我测试API,没问题的

感觉很多人在用python,语言太多了还是一个通用 的好

就好比有人用刀,有人用剑,还有人用棍子
让谁改,谁都不乐意啊
其实我Python也没学多久

@oflyhigh. I like post you. Nice post. I follow

steemdb和我本身的follow也有一点差距 几个吧 不知是不是延迟。steemdb总少点

steemdb的数据源不知道是哪里
直接从官网节点读,一般来讲都是准确的

有些节点可能有延迟
有些自己建的数据库还可能丢数据
(Steemdata也有丢数据的情况)

your profile looks great man! I hope for some english posts!

Every time I come to your blog, you give me a good post @oflyhigh
greetings
I hope we can be friends

Thank you, We are already friends.

Thank you ,, maybe you can come in my blog :D

嗨,我已经upvote你,并把你添加到steemvoter。你总是发布信息的帖子

Coin Marketplace

STEEM 0.26
TRX 0.11
JST 0.033
BTC 64507.66
ETH 3080.07
USDT 1.00
SBD 3.85