message: [refactor] clean up logic in testmempoolaccept
  Cleans up reundant code and reduces the diff of the next commit.
diff: @@ -927,27 +927,30 @@ static RPCHelpMan testmempoolaccept()
  false /* bypass_limits */, /* test_accept */ true);
  }
  + // Only return the fee and vsize if the transaction would pass ATMP.
  + // These can be used to calculate the feerate.
  + if (test_accept_res) {
  // Check that fee does not exceed maximum fee
  - if (test_accept_res && max_raw_tx_fee && fee > max_raw_tx_fee) {
  + if (max_raw_tx_fee && fee > max_raw_tx_fee) {
  result_0.pushKV("allowed", false);
  result_0.pushKV("reject-reason", "max-fee-exceeded");
  - result.push_back(std::move(result_0));
  - return result;
  + } else {
  + result_0.pushKV("allowed", true);
  + result_0.pushKV("vsize", virtual_size);
  + UniValue fees(UniValue::VOBJ);
  + fees.pushKV("base", ValueFromAmount(fee));
  + result_0.pushKV("fees", fees);
  }
  - result_0.pushKV("allowed", test_accept_res);
  - if (!test_accept_res) {
  - if (state.IsInvalid()) {
  + result.push_back(std::move(result_0));
  + } else {
  + result_0.pushKV("allowed", false);
  if (state.GetResult() == TxValidationResult::TX_MISSING_INPUTS) {
  result_0.pushKV("reject-reason", "missing-inputs");
  - } else {
  - result_0.pushKV("reject-reason", strprintf("%s", state.GetRejectReason()));
  - }
  } else {
  result_0.pushKV("reject-reason", state.GetRejectReason());
  }
  - }
  -
  result.push_back(std::move(result_0));
  + }
  return result;
  },
  };
  