Core development report #3

By @howo5/28/2020hive-139531

image.png

Hi,

this week I worked on the proposal update operation and adapting the current create proposal operation to change the fee structure (10 HBD the first 60 days then 1 extra HBD per day). I created the operation in the core blockchain code, and also updated the cli_wallet utility to make use of that new operation.

Since that code is scheduled I wanted to get it out as fast as possible so I skipped unit tests for now as it's an easy endpoint to test but I'll do them later to avoid having regressions (https://gitlab.syncad.com/hive/hive/-/issues/51)

If you're interested you can see the code here: https://gitlab.syncad.com/hive/hive/-/merge_requests/48

That code has been merged and scheduled for hf24.

So far we went with the same parameters but I really liked fredrikaa's idea so I might make more changes to it later on.

And you can easily test out that new operation like so: (assuming you built a local testnet on the latest 0.24.0)

create_account "initminer" "howo" "" true
transfer_to_vesting "initminer" "howo" "10000.000 TESTS" true
post_comment howo "test" "" "tag" "title" "body" "" true
transfer  initminer howo "2500.000 TBD" "" true

create_proposal howo howo "2020-05-22T03:00:00" "2020-05-28T04:00:00" "200.000 TBD" "cool proposal vote me" "test" true

find_proposals [0]

the above should output: 

[{
    "id": 0,
    "proposal_id": 0,
    "creator": "howo",
    "receiver": "howo",
    "start_date": "2020-05-21T03:00:00",
    "end_date": "2021-05-21T03:00:00",
    "daily_pay": "200.000 TBD",
    "subject": "cool proposal vote me",
    "permlink": "test",
    "total_votes": 0
  }
]

update_proposal 0 "howo" "100.000 TBD" "cool proposal" "test" true
find_proposals [0]

should output: 

[{
    "id": 0,
    "proposal_id": 0,
    "creator": "howo",
    "receiver": "howo",
    "start_date": "2020-05-21T03:00:00",
    "end_date": "2021-05-21T03:00:00",
    "daily_pay": "100.000 TBD",
    "subject": "cool proposal",
    "permlink": "test",
    "total_votes": 0
  }
]

get_account_history howo 0 1000
392

comments