Skip to content
This repository has been archived by the owner on Oct 4, 2019. It is now read-only.

Commit

Permalink
Merge pull request #1320 from GolosChain/1319-worker-result-check-pos…
Browse files Browse the repository at this point in the history
…t-in-cashout

Forbid create worker results on archived posts #1319
  • Loading branch information
afalaleev authored May 31, 2019
2 parents 4dad515 + 97473d7 commit 0d8a522
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions libraries/chain/worker_evaluators.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,8 @@ namespace golos { namespace chain {
logic_exception::worker_result_can_be_created_only_on_post,
"Worker result can be created only on post");

WORKER_CHECK_POST_IN_CASHOUT_WINDOW(post);

const auto* wto_result = _db.find_worker_result(post.id);
GOLOS_CHECK_LOGIC(!wto_result,
logic_exception::this_post_already_used_as_worker_result,
Expand Down

0 comments on commit 0d8a522

Please sign in to comment.