fixed transaction priority
This commit is contained in:
@@ -74,7 +74,7 @@ download:
|
|||||||
# A general rule of thumb is that `make depends_host` works everywhere, but not everything
|
# A general rule of thumb is that `make depends_host` works everywhere, but not everything
|
||||||
# is required. But since we target so many different OS.. yeah.
|
# is required. But since we target so many different OS.. yeah.
|
||||||
.PHONY: depends_host
|
.PHONY: depends_host
|
||||||
depends_host: libiconv_host boost_host zlib_host openssl_host openssl_host_alt libzmq_host libsodium_host host_copy_libs libexpat_host unbound_host polyseed_host utf8proc_host
|
depends_host: libiconv_host boost_host zlib_host openssl_host openssl_host_alt libzmq_host libsodium_host host_copy_libs libexpat_host unbound_host polyseed_host utf8proc_host host_copy_libs
|
||||||
|
|
||||||
.PHONY: host_copy_libs
|
.PHONY: host_copy_libs
|
||||||
host_copy_libs:
|
host_copy_libs:
|
||||||
|
|||||||
@@ -1166,6 +1166,17 @@ const char* MONERO_Wallet_getMultisigInfo(void* wallet_ptr) {
|
|||||||
memcpy(buffer, str.c_str(), size + 1);
|
memcpy(buffer, str.c_str(), size + 1);
|
||||||
return buffer;
|
return buffer;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Monero::PendingTransaction::Priority PendingTransaction_Priority_fromInt(int value) {
|
||||||
|
switch(value) {
|
||||||
|
case 0: return Monero::PendingTransaction::Priority::Priority_Default;
|
||||||
|
case 1: return Monero::PendingTransaction::Priority::Priority_Low;
|
||||||
|
case 2: return Monero::PendingTransaction::Priority::Priority_Medium;
|
||||||
|
case 3: return Monero::PendingTransaction::Priority::Priority_High;
|
||||||
|
default: return Monero::PendingTransaction::Priority::Priority_Default;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void* MONERO_Wallet_createTransaction(void* wallet_ptr, const char* dst_addr, const char* payment_id,
|
void* MONERO_Wallet_createTransaction(void* wallet_ptr, const char* dst_addr, const char* payment_id,
|
||||||
uint64_t amount, uint32_t mixin_count,
|
uint64_t amount, uint32_t mixin_count,
|
||||||
int pendingTransactionPriority,
|
int pendingTransactionPriority,
|
||||||
@@ -1178,16 +1189,14 @@ void* MONERO_Wallet_createTransaction(void* wallet_ptr, const char* dst_addr, co
|
|||||||
}
|
}
|
||||||
std::set<uint32_t> subaddr_indices = {};
|
std::set<uint32_t> subaddr_indices = {};
|
||||||
std::set<std::string> preferred_inputs = splitString(std::string(preferredInputs), std::string(separator));
|
std::set<std::string> preferred_inputs = splitString(std::string(preferredInputs), std::string(separator));
|
||||||
wallet->info("MONERO_C", "TEST");
|
|
||||||
wallet->info("MONERO_C", preferredInputs);
|
|
||||||
wallet->info("MONERO_C", std::to_string(preferred_inputs.size()));
|
|
||||||
auto oneInput = *(preferred_inputs.begin());
|
auto oneInput = *(preferred_inputs.begin());
|
||||||
wallet->info("MONERO_C", oneInput);
|
|
||||||
return wallet->createTransaction(std::string(dst_addr), std::string(payment_id),
|
return wallet->createTransaction(std::string(dst_addr), std::string(payment_id),
|
||||||
optAmount, mixin_count,
|
optAmount, mixin_count,
|
||||||
Monero::PendingTransaction::Priority_Low,
|
PendingTransaction_Priority_fromInt(pendingTransactionPriority),
|
||||||
subaddr_account, subaddr_indices, preferred_inputs);
|
subaddr_account, subaddr_indices, preferred_inputs);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void* MONERO_Wallet_loadUnsignedTx(void* wallet_ptr, const char* fileName) {
|
void* MONERO_Wallet_loadUnsignedTx(void* wallet_ptr, const char* fileName) {
|
||||||
Monero::Wallet *wallet = reinterpret_cast<Monero::Wallet*>(wallet_ptr);
|
Monero::Wallet *wallet = reinterpret_cast<Monero::Wallet*>(wallet_ptr);
|
||||||
return wallet->loadUnsignedTx(std::string(fileName));
|
return wallet->loadUnsignedTx(std::string(fileName));
|
||||||
|
|||||||
Reference in New Issue
Block a user