| 289 | } |
| 290 | |
| 291 | string Eth::eth_signTransaction(Json::Value const& _json) |
| 292 | { |
| 293 | try |
| 294 | { |
| 295 | TransactionSkeleton t = toTransactionSkeleton(_json); |
| 296 | setTransactionDefaults(t); |
| 297 | TransactionNotification n = m_ethAccounts.authenticate(t); |
| 298 | switch (n.r) |
| 299 | { |
| 300 | case TransactionRepercussion::Success: |
| 301 | return toJS(n.hash); |
| 302 | case TransactionRepercussion::ProxySuccess: |
| 303 | return toJS(n.hash);// TODO: give back something more useful than an empty hash. |
| 304 | default: |
| 305 | // TODO: provide more useful information in the exception. |
| 306 | BOOST_THROW_EXCEPTION(JsonRpcException(Errors::ERROR_RPC_INVALID_PARAMS)); |
| 307 | } |
| 308 | } |
| 309 | catch (...) |
| 310 | { |
| 311 | BOOST_THROW_EXCEPTION(JsonRpcException(Errors::ERROR_RPC_INVALID_PARAMS)); |
| 312 | } |
| 313 | } |
| 314 | |
| 315 | Json::Value Eth::eth_inspectTransaction(std::string const& _rlp) |
| 316 | { |
no test coverage detected