mirror of
https://github.com/wownero/wownero-cpp.git
synced 2026-12-03 21:54:05 +01:00
implement MoneroUtils::cnTxToTx();
support vins and extra in daemon model
This commit is contained in:
@@ -255,12 +255,12 @@ namespace monero {
|
||||
if (prunableHash != boost::none) node.put("prunableHash", *prunableHash);
|
||||
if (size != boost::none) node.put("size", *size);
|
||||
if (weight != boost::none) node.put("weight", *weight);
|
||||
if (!vins.empty()) node.add_child("vouts", MoneroUtils::toPropertyTree(vouts));
|
||||
if (!vins.empty()) node.add_child("vins", MoneroUtils::toPropertyTree(vins));
|
||||
if (!vouts.empty()) node.add_child("vouts", MoneroUtils::toPropertyTree(vouts));
|
||||
if (!outputIndices.empty()) throw runtime_error("outputIndices not implemented");
|
||||
if (metadata != boost::none) node.put("metadata", *metadata);
|
||||
if (commonTxSets != boost::none) throw runtime_error("commonTxSets not implemented");
|
||||
if (!extra.empty()) throw runtime_error("extra not implemented");
|
||||
if (!extra.empty()) node.add_child("extra", MoneroUtils::toPropertyTree(extra));
|
||||
if (rctSignatures != boost::none) throw runtime_error("rctSignatures not implemented");
|
||||
if (rctSigPrunable != boost::none) throw runtime_error("rctSigPrunable not implemented");
|
||||
if (isKeptByBlock != boost::none) node.put("isKeptByBlock", *isKeptByBlock);
|
||||
@@ -435,7 +435,7 @@ namespace monero {
|
||||
if (src->keyImage != boost::none) tgt->keyImage = src->keyImage.get()->copy(src->keyImage.get(), make_shared<MoneroKeyImage>());
|
||||
tgt->amount = src->amount;
|
||||
tgt->index = src->index;
|
||||
if (!src->ringOutputIndices.empty()) tgt->ringOutputIndices = vector<uint32_t>(src->ringOutputIndices);
|
||||
if (!src->ringOutputIndices.empty()) tgt->ringOutputIndices = vector<uint64_t>(src->ringOutputIndices);
|
||||
tgt->stealthPublicKey = src->stealthPublicKey;
|
||||
return tgt;
|
||||
}
|
||||
@@ -445,7 +445,7 @@ namespace monero {
|
||||
if (keyImage != boost::none) node.add_child("keyImage", (*keyImage)->toPropertyTree());
|
||||
if (amount != boost::none) node.put("amount", *amount);
|
||||
if (index != boost::none) node.put("index", *index);
|
||||
if (!ringOutputIndices.empty()) throw runtime_error("MoneroOutput::toPropertyTree() ringOutputIndices not implemented");
|
||||
if (!ringOutputIndices.empty()) node.add_child("ringOutputIndices", MoneroUtils::toPropertyTree(ringOutputIndices));
|
||||
if (stealthPublicKey != boost::none) node.put("stealthPublicKey", *stealthPublicKey);
|
||||
return node;
|
||||
}
|
||||
|
||||
@@ -157,7 +157,7 @@ namespace monero {
|
||||
static const string DEFAULT_PAYMENT_ID; // default payment id "0000000000000000"
|
||||
boost::optional<shared_ptr<MoneroBlock>> block;
|
||||
boost::optional<string> id;
|
||||
boost::optional<string> version;
|
||||
boost::optional<uint32_t> version;
|
||||
boost::optional<bool> isCoinbase;
|
||||
boost::optional<string> paymentId;
|
||||
boost::optional<uint64_t> fee;
|
||||
@@ -183,7 +183,7 @@ namespace monero {
|
||||
vector<uint32_t> outputIndices;
|
||||
boost::optional<string> metadata;
|
||||
boost::optional<string> commonTxSets;
|
||||
vector<uint32_t> extra;
|
||||
vector<uint8_t> extra;
|
||||
boost::optional<string> rctSignatures; // TODO: implement
|
||||
boost::optional<string> rctSigPrunable; // TODO: implement
|
||||
boost::optional<bool> isKeptByBlock;
|
||||
@@ -220,7 +220,7 @@ namespace monero {
|
||||
boost::optional<shared_ptr<MoneroKeyImage>> keyImage;
|
||||
boost::optional<uint64_t> amount;
|
||||
boost::optional<uint64_t> index;
|
||||
vector<uint32_t> ringOutputIndices;
|
||||
vector<uint64_t> ringOutputIndices;
|
||||
boost::optional<string> stealthPublicKey;
|
||||
|
||||
shared_ptr<MoneroOutput> copy(const shared_ptr<MoneroOutput>& src, const shared_ptr<MoneroOutput>& tgt) const;
|
||||
|
||||
Reference in New Issue
Block a user