per_kb_fee -> per_byte_fee (#25)

This commit is contained in:
j-berman 2022-02-21 08:17:30 -05:00 committed by Lee *!* Clagett
parent f0bb992f00
commit f027c15479
3 changed files with 7 additions and 7 deletions

View file

@ -540,12 +540,12 @@ namespace lws
if (resp->size_scale == 0 || 1024 < resp->size_scale || resp->fee_mask == 0) if (resp->size_scale == 0 || 1024 < resp->size_scale || resp->fee_mask == 0)
return {lws::error::bad_daemon_response}; return {lws::error::bad_daemon_response};
const std::uint64_t per_kb_fee = const std::uint64_t per_byte_fee =
resp->estimated_base_fee * (1024 / resp->size_scale); resp->estimated_base_fee / resp->size_scale;
const std::uint64_t per_kb_fee_masked = const std::uint64_t per_byte_fee_masked =
((per_kb_fee + (resp->fee_mask - 1)) / resp->fee_mask) * resp->fee_mask; ((per_byte_fee + (resp->fee_mask - 1)) / resp->fee_mask) * resp->fee_mask;
return response{per_kb_fee_masked, resp->fee_mask, rpc::safe_uint64(received), std::move(unspent), std::move(req.creds.key)}; return response{per_byte_fee_masked, resp->fee_mask, rpc::safe_uint64(received), std::move(unspent), std::move(req.creds.key)};
} }
}; };

View file

@ -294,7 +294,7 @@ namespace lws
return expand_outputs{src, self.user_key}; return expand_outputs{src, self.user_key};
}; };
wire::object(dest, wire::object(dest,
WIRE_FIELD_COPY(per_kb_fee), WIRE_FIELD_COPY(per_byte_fee),
WIRE_FIELD_COPY(fee_mask), WIRE_FIELD_COPY(fee_mask),
WIRE_FIELD_COPY(amount), WIRE_FIELD_COPY(amount),
wire::field("outputs", wire::as_array(std::cref(self.outputs), expand)) wire::field("outputs", wire::as_array(std::cref(self.outputs), expand))

View file

@ -155,7 +155,7 @@ namespace rpc
struct get_unspent_outs_response struct get_unspent_outs_response
{ {
get_unspent_outs_response() = delete; get_unspent_outs_response() = delete;
std::uint64_t per_kb_fee; std::uint64_t per_byte_fee;
std::uint64_t fee_mask; std::uint64_t fee_mask;
safe_uint64 amount; safe_uint64 amount;
std::vector<std::pair<db::output, std::vector<crypto::key_image>>> outputs; std::vector<std::pair<db::output, std::vector<crypto::key_image>>> outputs;