-
Notifications
You must be signed in to change notification settings - Fork 36
Conversation
Do not write me about code style in code what is not my but is near. I will do big code style fix after all work. |
I have the problems with adding and resetting referrer's beneficiary in Problem 1. See here: c72edaa#diff-04f6af9cdbf180a31ccdbf6335b8f240R704 Problem 2. Questions:
|
|
Bug fixed: And this one ("Benficiaries") couldn't be fixed: |
libraries/chain/steem_evaluator.cpp
Outdated
void operator()(const account_referral_options& aro) const { | ||
if (!_db.has_hardfork(STEEMIT_HARDFORK_0_19__295)) { | ||
FC_THROW_EXCEPTION(golos::unsupported_operation, | ||
"account_referral_options is not supported until STEEMIT_HARDFORK_0_19__295"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Replace with ASSERT_REQ_HF()
libraries/chain/steem_evaluator.cpp
Outdated
com.cashout_time = com.created + STEEMIT_CASHOUT_WINDOW_SECONDS; | ||
} | ||
|
||
if (_db.has_hardfork(STEEMIT_HARDFORK_0_19__295) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not needed case.
Referrer appears on create of account, it can't appear after some time.
So, additing of beneficiary can happen only on create post/comment.
libraries/chain/steem_evaluator.cpp
Outdated
if (!_db.has_hardfork(STEEMIT_HARDFORK_0_19__295)) { | ||
FC_THROW_EXCEPTION(golos::unsupported_operation, | ||
"break_free_referral_operation is not supported until STEEMIT_HARDFORK_0_19__295"); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ASSERT_REQ_HF()
ASSERT_REQ_HF:98b46dd#diff-d28716ca583d6a29157aac7c681bf2e1L7
|
GET_ACTOR:No such |
libraries/chain/steem_evaluator.cpp
Outdated
} | ||
}); | ||
|
||
GOLOS_CHECK_VALUE(total_weight <= STEEMIT_100_PERCENT, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Errors still diffirent.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Errors still different.
c7a0e7c
to
6312b51
Compare
Fixing tests now. |
6312b51
to
21941f5
Compare
|
||
void validate() const; | ||
}; | ||
|
||
typedef static_variant < | ||
using comment_options_extension = static_variant< |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do you change these lines? Issue doesn't require it.
|
||
typedef flat_set <comment_options_extension> comment_options_extensions_type; | ||
using comment_options_extensions_type = flat_set<comment_options_extension>; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do you change these lines? Issue doesn't require it.
@@ -865,7 +889,7 @@ namespace golos { namespace protocol { | |||
void validate() const; | |||
}; | |||
|
|||
typedef fc::static_variant<pow2, equihash_pow> pow2_work; | |||
using pow2_work = fc::static_variant<pow2, equihash_pow>; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do you change this line? Issue doesn't require it.
libraries/chain/steem_evaluator.cpp
Outdated
} | ||
}); | ||
|
||
GOLOS_CHECK_VALUE(total_weight <= STEEMIT_100_PERCENT, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Errors still different.
21941f5
to
5e40b65
Compare
Not yet |
5e40b65
to
d32e3a9
Compare
ASSERT_REQ_HF(STEEMIT_HARDFORK_0_19__295, "chain_properties_19"); | ||
result_type r; | ||
r = p; | ||
return r; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Better to pass reference to witness properties and set value here.
In this case it will be not overwrite values from different versions of chain_properties.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Another way to block using of chain_properties_18 in HF 19.
c5702b3
to
9f14793
Compare
9f14793
to
50cd36c
Compare
…eward poll. #898 Merge pull request #937 from GolosChain/golos-v0.18.4 Golos v0.18.4 Add chain_properties_19 #295 Merge pull request #938 from GolosChain/295-referral-program chain_properties_19 #295 Made auction window votable. Fixed rewards calculations. #898 Merge branch 'master' into golos-v0.19.0 Fix naming in chain_properties_19 #295 Merge pull request #939 from GolosChain/295-chain-propertie Fix naming in chain_properties_19 #295 Updated with current 19.0 Added auction_window_size to wallet update_chain_properties. #898 Fixed some codestyle errors. Changed auction_window_weight to uint128_t. #898 Added HF19 checks. Fixed auction_window_size in update_chain_properties. #898 Added auction_window_max_size constant to config. Added HF19 checks in steem_evaluator. #898 Fixed some comment reward logic in tests. #898 Referral program, ASSERT_REQ_HF improved, HF 19 #295 Merge pull request #942 from GolosChain/295-referral-program-impl2 Referral program implemented #295 Update with current 19.0. #898 Fixed auction window tokens return to reward fund. #898 Renamed modify reward fund function. #898
#295
Creating referral account. Hardfork check. Disabled breaking referral
test
account and it'stestref
referral account.You have a fail with message about unsupported operation because you done it before 19 hardfork applied. Wait for this hardfork and run again.
See the Mongo.
Result: account_object has an object will following fields:
get_accounts
API with following HTML page in browser:Result:
Result: fail - no right to break referral.
Enabled breaking referral. Try to break referral without enough balance
Result:
Result: fail - does not have sufficient funds.
Result: success.
Result:
Result:
Creating comment before breaking referral and after it
Result: no object with account="test" in
beneficiaries
.