GolosChain / golos

Socio-economic mediablockchain
https://developers.golos.io
Other
59 stars 36 forks source link

Bug with cli_wallet and witnes_update #713

Closed t3ran13 closed 6 years ago

t3ran13 commented 6 years ago

if i try broadcast witnes_update i get

Assert Exception (10) api_itr != _registered_apis.end(): Could not find API witness_api

wtf? i did not read info, i send trx

zxcat commented 6 years ago

@t3ran13, is witness_api plugin enabled on your node? when you call update_witnesscommand in cli_wallet, it's not direct broadcast. cli_wallet first reads some data from node, including get_witness_by_account.

You can broadcast directly using transaction builder (begin_builder_transaction, add_operation_to_builder_transaction, sign_builder_transaction) or use external libs like golos-js

t3ran13 commented 6 years ago

get_witness_by_account is not necessary, node checks keys when got trx

zxcat commented 6 years ago

get_witness_by_account required to get previous value of url field. if you pass null value as url to update_witness, url will not be changed.

It's possible to improve this logic so get_witness_by_account will be called only if url=null

zxcat commented 6 years ago

PR #718