Fix for key error when sending broadcast trx
There are two formats for broadcast transaction:
- condenser_api format, where
request_params['operations']
islist
oflists
- network_broadcast_api, where
request_params['operations']
islist
ofdict
validator.py
has a support only for 1
, support for 2
has been added
Fix for: {"exception":"KeyError(0,)","message":"Internal Error","error_id":"65c8a0e4-ecd4-4424-a490-7f87cb0c889a","jrpc_request_id":1,"jussi_request_id":"001113248166147000","event":"Internal Error","logger":"jussi.errors","level":"error"}
while sending: curl -s --data '{"jsonrpc":"2.0", "method":"network_broadcast_api.broadcast_transaction", "params":{"trx":{"ref_block_num":1097,"ref_block_prefix":2181793527,"expiration":"2016-03-24T18:00:21","operations":[{"type":"vote_operation","value":{"voter":"hiveio","author":"alice","permlink":"a-post-by-alice","weight":10000}}],"extensions":[],"signatures":[]},"max_block_age":50}, "id":1}' https://beta.openhive.network