Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[rpc] Simplify error response from execute_transaction_block of transaction_execution_api #12989

Merged
merged 9 commits into from
Aug 14, 2023
Prev Previous commit
Next Next commit
suggestion on building new_map
Co-authored-by: Lu Zhang <8418040+longbowlu@users.noreply.github.com>
  • Loading branch information
wlmyng and longbowlu committed Aug 10, 2023
commit 4f5989d3d8cbbf672a26ff115d0db32e863e512e
4 changes: 3 additions & 1 deletion crates/sui-json-rpc/src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,9 @@ impl From<Error> for RpcError {

let mut new_map: BTreeMap<TransactionDigest, Vec<ObjectRef>> = BTreeMap::new();

for (digest, (pairs, _)) in conflicting_txes {
let new_map = conflicting_txes.into_iter()
.map(|(digest, (pairs, _))| (digest, pairs.into_iter().map(|_, obj_ref| obj_ref).collect()))
.collect::<BTreeMap<_, Vec<_>>>();
let mut new_vec = Vec::new();

for (_authority, obj_ref) in pairs {
Expand Down