create account

SVC 자동 보팅 후 소각 오류 by realmankwon

View this thread on: hive.blogpeakd.comecency.com
· @realmankwon ·
$26.53
SVC 자동 보팅 후 소각 오류
안녕하세요 @realmankwon입니다.

어제 저녁에 @kopasi님으로부터 @svc.refund 계정에 SVC가 소각되지 않고 있다는 내용의 카톡을 받았습니다.
애들을 제울려던 찰나에 잠깐 로그를 확인했더니 보팅은 정상적으로 되고 있었고 그 이후에 exception이 발생하면서 소각처리를 위한 데이터가 입력이 되지 않는 것을 확인했습니다.

애들을 제워야겠다는 생각에 대충 소스와 로그를 확인해서 스팀 api 호출 후에 post라는 변수에 제대로 값을 못 넣어줘서 그렇겠거니라고 생각했습니다.
일단 보팅은 되고 있고 데이터도 쌓이고 있으니 소각은 후처리하면 될 듯 하여 다시 안방으로 가서 본연의 임무를 완수했습니다.

# 1 . 오류 수정
금일 새벽에 작업이 있어서 오전 3시경 회사에 출근을 하여 대기 시간에 로그와 소스를 찬찬히 훓어 보았습니다.

![](https://cdn.steemitimages.com/DQmNg4nsZZhzuV4Zau4vshEsGJoCVgzRADKG2yXytrBKDha/image.png)

다시 보니 보팅이 정상적으로 이루어진 후에 하단에 있는 어딘가에서 다음의 exception 이 발생했습니다.

>RerenceError: post is not define

이건 api 호출 에러가 아니라 변수 자체가 선언이 안 되었다는 에러이기 때문에 저의 소스 상에 문제가 있는 것이었습니다.
다시 소스를 확인해 보니 제가 작성한 공통 api 함수에 버그가 있었습니다.
며칠 전 추가한 댓글을 작성하는 api 함수에서 댓글을 작성한 후에 정상처리가 되면 resolve로 결과값을 전달해야 하는데 거기에 post라는 변수를 잘못 입력해 놓았더군요.

댓글은 정상적으로 작성이 되었지만 resolve로 결과값을 전달할때 exception이 나는 바람에 소각하는 데이터 입력이 rollback이 되었던 것입니다.
해당 api 함수를 수정하여 배포하였고 다음과 같이 보팅이 정상적으로 이루어진 후 댓글을 작성하고 소각이 되는 것까지 확인을 하였습니다.4ㅜ ,

![](https://cdn.steemitimages.com/DQmdBYYLyNRDF5NnQro3GDiPMZUwMhrziNtbqPmkoXSimHX/image.png)

에러없이 깔끔하게 정리가 되었습니다.

# 2 . SVC 소각처리
우선 소각처리가 되지 않는 SVC의 개수를 파악하였습니다.
제일 마지막으로 보팅을 하고 소각을 처리한 포스팅은 아래 사진의 빨간색 상자 부분입니다.

![](https://cdn.steemitimages.com/DQmWj4Wa2BjE5XbJEc9RgsS6JjUyp4jrC8Rj152MHtd2eE7/image.png)

그리고 보팅이 이루어지고 소각이 되지 않은 포스팅은 파란 상자 부분입니다.
해당 건들은 DB에 값을 저장하였고 다음과 같이 소각까지 처리가 완료되었습니다.

![](https://cdn.steemitimages.com/DQmWZuoqdLDwaoA8dWG5zchV5WXuw8sgbEQVFDivQMydz6S/image.png)

# 3 . 중복 전송
소각 내역을 확인 하다보니 동일 포스팅에 대해서 중복으로 보낸 전송내역이 있었습니다.

![](https://cdn.steemitimages.com/DQmXsuKCQBQnp7KxAoJbe53ZtW2Eq4TaiopeGqgY6tngzbK/image.png)

![](https://cdn.steemitimages.com/DQmQHidsE9kNYxpW2385t4MyPFasct6U5EkH7oTuyjj7x7k/image.png)

현재 중복 전송에 대한 반환 로직은 추가하지 않았습니다.
관련해서 최근 50개 전송 내역 이내에 중복으로 전송한 것이 있으면 반환하는 로직을 추가하도록 해야겠습니다.
오늘 밤을 새면서 한번 작성을 해 봐야겠습니다. ^^
저는 밤을 새지만 다들 평안한 새벽되고 계시길...ㅋ
👍  , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , and 145 others
properties (23)
authorrealmankwon
permlink74mytx-svc
categorysct
json_metadata{"tags":["sct","sct-kr","sct-freeboard","union","palnet","steemleo","zzan","liv","busy"],"users":["realmankwon","kopasi","svc.refund"],"image":["https://cdn.steemitimages.com/DQmNg4nsZZhzuV4Zau4vshEsGJoCVgzRADKG2yXytrBKDha/image.png","https://cdn.steemitimages.com/DQmdBYYLyNRDF5NnQro3GDiPMZUwMhrziNtbqPmkoXSimHX/image.png","https://cdn.steemitimages.com/DQmWj4Wa2BjE5XbJEc9RgsS6JjUyp4jrC8Rj152MHtd2eE7/image.png","https://cdn.steemitimages.com/DQmWZuoqdLDwaoA8dWG5zchV5WXuw8sgbEQVFDivQMydz6S/image.png","https://cdn.steemitimages.com/DQmXsuKCQBQnp7KxAoJbe53ZtW2Eq4TaiopeGqgY6tngzbK/image.png","https://cdn.steemitimages.com/DQmQHidsE9kNYxpW2385t4MyPFasct6U5EkH7oTuyjj7x7k/image.png"],"app":"steemcoinpan/0.1","format":"markdown","canonical_url":"https://www.steemcoinpan.com/@realmankwon/74mytx-svc"}
created2019-11-30 20:14:36
last_update2019-11-30 20:14:36
depth0
children9
last_payout2019-12-07 20:14:36
cashout_time1969-12-31 23:59:59
total_payout_value14.481 HBD
curator_payout_value12.050 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length1,891
author_reputation256,638,399,773,710
root_title"SVC 자동 보팅 후 소각 오류"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id92,969,511
net_rshares93,055,917,970,713
author_curate_reward""
vote details (209)
@deer3 ·
헛 중복이 있었군요... 늘 수고 많으십니다!
properties (22)
authordeer3
permlinkq1tp7q
categorysct
json_metadata{"tags":["sct"],"app":"steemcoinpan/0.1","canonical_url":"https://www.steemcoinpan.com/@deer3/q1tp7q"}
created2019-12-01 07:38:21
last_update2019-12-01 07:38:21
depth1
children1
last_payout2019-12-08 07:38:21
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length25
author_reputation327,610,307,187,791
root_title"SVC 자동 보팅 후 소각 오류"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id92,992,701
net_rshares0
@realmankwon ·
중복건은 반환 완료했습니다~^^
properties (22)
authorrealmankwon
permlinkq1twft
categorysct
json_metadata{"tags":["sct"],"app":"steemcoinpan/0.1","canonical_url":"https://www.steemcoinpan.com/@realmankwon/q1twft"}
created2019-12-01 10:14:18
last_update2019-12-01 10:14:18
depth2
children0
last_payout2019-12-08 10:14:18
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length17
author_reputation256,638,399,773,710
root_title"SVC 자동 보팅 후 소각 오류"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id92,998,623
net_rshares0
@deer3 ·
deer3 gave realmankwon gifts(5 SCT).
👍  
properties (23)
authordeer3
permlinkthumbsup-comment-realmankwon-74mytx-svc
categorysct
json_metadata{"app":"steemcoinpan/0.1","format":"markdown","canonical_url":"https://www.steemcoinpan.com/@deer3/thumbsup-comment-realmankwon-74mytx-svc"}
created2019-12-01 07:38:48
last_update2019-12-01 07:38:48
depth1
children1
last_payout2019-12-08 07:38:48
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length36
author_reputation327,610,307,187,791
root_title"SVC 자동 보팅 후 소각 오류"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id92,992,716
net_rshares86,487,527
author_curate_reward""
vote details (1)
@realmankwon ·
어이쿠 감사합니다~^^
properties (22)
authorrealmankwon
permlinkq1twgo
categorysct
json_metadata{"tags":["sct"],"app":"steemcoinpan/0.1","canonical_url":"https://www.steemcoinpan.com/@realmankwon/q1twgo"}
created2019-12-01 10:14:51
last_update2019-12-01 10:14:51
depth2
children0
last_payout2019-12-08 10:14:51
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length12
author_reputation256,638,399,773,710
root_title"SVC 자동 보팅 후 소각 오류"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id92,998,641
net_rshares0
@fenrir78 ·
fenrir78님이 realmankwon님의 이 포스팅에 따봉(7 SCT)을 하였습니다.
👍  
properties (23)
authorfenrir78
permlinkthumbsup-comment-realmankwon-74mytx-svc
categorysct
json_metadata{"app":"steemcoinpan/0.1","format":"markdown","canonical_url":"https://www.steemcoinpan.com/@fenrir78/thumbsup-comment-realmankwon-74mytx-svc"}
created2019-12-02 11:54:03
last_update2019-12-02 11:54:03
depth1
children0
last_payout2019-12-09 11:54:03
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length49
author_reputation438,129,541,905,139
root_title"SVC 자동 보팅 후 소각 오류"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id93,032,264
net_rshares1,087,288,807
author_curate_reward""
vote details (1)
@stablewon ·
^^
properties (22)
authorstablewon
permlinkre--74mytx-svc-20191204t073015001z
categorysct
json_metadata{"tags":["sct","sct-kr","sct-freeboard","union","palnet","steemleo","zzan","liv","busy"]}
created2019-12-04 07:30:15
last_update2019-12-04 07:30:15
depth1
children0
last_payout2019-12-11 07:30:15
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length2
author_reputation24,829,707,825,425
root_title"SVC 자동 보팅 후 소각 오류"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id93,094,438
net_rshares0
@steemitboard ·
Congratulations @realmankwon! You have completed the following achievement on the Steem blockchain and have been rewarded with new badge(s) :

<table><tr><td><img src="https://steemitimages.com/60x60/http://steemitboard.com/img/notifications/postallweek.png"></td><td>You published a post every day of the week</td></tr>
</table>

<sub>_You can view [your badges on your Steem Board](https://steemitboard.com/@realmankwon) and compare to others on the [Steem Ranking](https://steemitboard.com/ranking/index.php?name=realmankwon)_</sub>
<sub>_If you no longer want to receive notifications, reply to this comment with the word_ `STOP`</sub>


To support your work, I also upvoted your post!


###### [Vote for @Steemitboard as a witness](https://v2.steemconnect.com/sign/account-witness-vote?witness=steemitboard&approve=1) to get one more award and increased upvotes!
properties (22)
authorsteemitboard
permlinksteemitboard-notify-realmankwon-20191201t043408000z
categorysct
json_metadata{"image":["https://steemitboard.com/img/notify.png"]}
created2019-12-01 04:34:09
last_update2019-12-01 04:34:09
depth1
children0
last_payout2019-12-08 04:34:09
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length867
author_reputation38,975,615,169,260
root_title"SVC 자동 보팅 후 소각 오류"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id92,985,960
net_rshares0
@tradingideas ·
수고가 많으십니다.

Posted using [Partiko Android](https://partiko.app/referral/tradingideas)
properties (22)
authortradingideas
permlinktradingideas-re-realmankwon-74mytx-svc-20191201t060557543z
categorysct
json_metadata{"app":"partiko","client":"android"}
created2019-12-01 06:05:57
last_update2019-12-01 06:05:57
depth1
children1
last_payout2019-12-08 06:05:57
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length85
author_reputation473,979,989,726,345
root_title"SVC 자동 보팅 후 소각 오류"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id92,989,346
net_rshares0
@realmankwon ·
감사합니다~^^
properties (22)
authorrealmankwon
permlinkq1twg5
categorysct
json_metadata{"tags":["sct"],"app":"steemcoinpan/0.1","canonical_url":"https://www.steemcoinpan.com/@realmankwon/q1twg5"}
created2019-12-01 10:14:30
last_update2019-12-01 10:14:30
depth2
children0
last_payout2019-12-08 10:14:30
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length8
author_reputation256,638,399,773,710
root_title"SVC 자동 보팅 후 소각 오류"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id92,998,630
net_rshares0