You are viewing a single comment's thread from:

RE: SteemData Notify 代码学习二: Confirmation Worker / Code Study of SteemData Notify: Part two

in #cn7 years ago (edited)

The 24 character check is there for legacy reasons, and will be removed in the future. The 40 char size is the expected memo length, since 40 is the hexadecimal representation of sha1.

Bugs
Unfortunately, I don't understand Chinese, and Google Translate is not very helpful.

For all the bugs, please open the issues on Github.

Sort:  

Hi @furion, Thank you very much for providing the SteemData Notify service.

I had already explained the reasons for the different memo lengths in this article, Thank you again for the clarification.

As for Bug,

    settings = db.settings.find_one({'_id': _id})
    if settings:
        db.settings.update_one(
            {'_id': _id, 'username': op['from']},
            {'$set': {'confirmed': True}}
        )

I think it would be better to change above code to:

    settings = db.settings.find_one({'_id': _id, 'username': op['from']})
    if settings:
        db.settings.update_one(
            {'_id': _id, 'username': op['from']},
            {'$set': {'confirmed': True}}
        )

Otherwise, It may cause minor problems in some extreme cases .
I'll submit this issues on Github when I finished the study of your great code.