mirror of
https://codeberg.org/wownero/wownero-lws
synced 2026-01-09 23:25:16 -08:00
Add basic REST tests and fix a few bugs (#103)
This commit is contained in:
committed by
Lee *!* Clagett
parent
f785cad557
commit
fe9d861dfb
@@ -544,7 +544,7 @@ namespace lws
|
||||
MONERO_CHECK((*tclient)->send(std::move(msg), std::chrono::seconds{10}));
|
||||
}
|
||||
|
||||
if ((req.use_dust && req.use_dust) || !req.dust_threshold)
|
||||
if ((req.use_dust && *req.use_dust) || !req.dust_threshold)
|
||||
req.dust_threshold = rpc::safe_uint64(0);
|
||||
|
||||
if (!req.mixin)
|
||||
|
||||
@@ -262,6 +262,7 @@ namespace lws
|
||||
wire::field("coinbase", is_coinbase),
|
||||
wire::field("mempool", false),
|
||||
wire::field("mixin", self.value().info.spend_meta.mixin_count),
|
||||
wire::field("recipient", self.value().info.recipient),
|
||||
wire::field("spent_outputs", std::cref(self.value().spends))
|
||||
);
|
||||
}
|
||||
@@ -316,7 +317,7 @@ namespace lws
|
||||
WIRE_FIELD_COPY(per_byte_fee),
|
||||
WIRE_FIELD_COPY(fee_mask),
|
||||
WIRE_FIELD_COPY(amount),
|
||||
wire::field("outputs", wire::array(boost::adaptors::transform(self.outputs, expand)))
|
||||
wire::optional_field("outputs", wire::array(boost::adaptors::transform(self.outputs, expand)))
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -110,7 +110,7 @@ namespace wire
|
||||
static constexpr bool optional_on_empty() noexcept
|
||||
{ return is_optional_on_empty<value_type>::value; }
|
||||
|
||||
static constexpr bool is_required() noexcept { return Required; }
|
||||
static constexpr bool is_required() noexcept { return Required && !optional_on_empty(); }
|
||||
static constexpr std::size_t count() noexcept { return 1; }
|
||||
static constexpr unsigned id() noexcept { return I; }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user