openethereum/rpc/src
Niklas Adolfsson 6e7d8f90b5 [light] Validate account balance before importing transactions (#9417)
* `light::verify_transaction` basic tx validation

* update wasm tests

* Provide `cached_nonce` in `parity_next_nonce` RPC

* nits

* Improve error handeling

Two separate errors for distinguishing between `account not found` and
`insufficient balance`. However, when `next_nonce()` is called and the
account is not found then provide `local_best_next_nonce`!

* Ensure only one n/w request is performed

Refactored to code again:
* Removed `fn cached_next_nonce`
* Removed extra n/w request in `sign` to check balance
* Refactored `fill_optional_field` to request nonce and check account balance

* nits

* grumbles needless clone

* Prevent integer overflow with saturating add & mul

* Call `sign_transaction()` directly from `sign()`

Because the change in `fill_optional_fields` always fill the nonce it is
now possible to call `sign_transaction` directly instead of creating a
`ProspectiveSigner` "object".
2018-09-11 19:20:59 +02:00
..
tests Remove all dapp permissions related settings (#9120) 2018-08-07 20:52:23 +08:00
v1 [light] Validate account balance before importing transactions (#9417) 2018-09-11 19:20:59 +02:00
authcodes.rs Update license header and scripts (#8666) 2018-06-04 10:19:50 +02:00
http_common.rs Remove all dapp permissions related settings (#9120) 2018-08-07 20:52:23 +08:00
lib.rs Better support for eth_getLogs in light mode (#9186) 2018-08-25 23:06:01 +02:00