* rpc-client: Print transaction logs in preflight error
* Address feedback
* Update expected error message in program deploy test
* Use a semicolon before the data
`do_process_program_upgrade()` is already huge. It is better to put
sufficiently self-contained chunks of logic into individual functions.
Also, restructured the "staircase" pattern using early exits. It seems
to be more readable this way.
`unwrap_err()` does not contain a descriptive message for the case when
it succeeds. It may help someone debugging the test, in particular they
will see a short explanation without looking at the failed test.
Also, in a number of cases, `unwrap_err()` result was not checked,
creating a possibility for false positives. As the generated error
might be different from the one expected by the test author.
```
error: assigning the result of `Clone::clone()` may be inefficient
--> bucket_map/src/bucket.rs:979:17
|
979 | hashed = hashed_raw.clone();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `clone_from()`: `hashed.clone_from(&hashed_raw)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assigning_clones
= note: `-D clippy::assigning-clones` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(clippy::assigning_clones)]`
```
* Flip no_extend to auto_extend
* Apply suggestions from code review
Co-authored-by: Joe C <joecaulfield29@yahoo.com>
---------
Co-authored-by: Joe C <joecaulfield29@yahoo.com>
* add checks for program data account overflow during upgrade and add --auto-extend-program flag to solana program deploy command
* remove logs
* cleanup tests
* automatically extend program data account and add a --no-auto-extend-program falg
* change comments in do_process_program_upgrade
* simplify comments in do_process_program_upgrade
* resolve comments
* cleanup
* change error messages
* resolve comments
* Fix after rebase
* Fix after rebase
* fix cargo clippy
* cli: add tests for auto-extend
---------
Co-authored-by: Joe Caulfield <joe.caulfield@anza.xyz>
The rest of the codebase has `clippy::arithmetic_side_effects` enabled.
While CLI is not as critical as the rest of the validator code base, it
seems nice to be precise about the arithmetic operations, and clippy
helps with that if `arithmetic_side_effects` is enabled.
A blanket disable at the module level is suboptimal. As we have a lot
of operations already written, that generate warnings under
`arithmetic_side_effects`, the first step is to move the lint control
into individual modules, that we can then inspect one by one.
* add set compute units arg for program deploy
* update master changes
* remove duplicates
* fixes and tests
* remove extra lines
* feedback
* Use simulation to determine compute units consumed
* feedback
---------
Co-authored-by: NagaprasadVr <nagaprasadvr246@gmail.com>