Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
666f645
Merge #12240: [rpc] Introduced a new `fees` structure that aggregates…
laanwj Apr 26, 2018
2564c17
Merge #12567: util: Print timestamp strings in logs using ISO 8601 fo…
laanwj Mar 10, 2018
4f77eff
Merge #12252: Require all tests to follow naming convention
Jan 30, 2018
898423c
Merge #12723: Qt5: Warning users about invalid-BIP21 URI bitcoin://
laanwj Mar 21, 2018
32e61f1
Merge #12746: tests: Remove unused argument max_invalid from check_es…
Mar 21, 2018
ff7f5d5
Merge #12747: Fix typos
Mar 21, 2018
9b47b31
Merge #12704: base58: use map instead of strchr() when decode
laanwj Mar 22, 2018
6d46698
Merge #12076: qa: Use node.datadir instead of tmpdir in test framework
laanwj Mar 22, 2018
b67649f
Merge #12779: Qt: Remove unused method setupAmountWidget(...)
laanwj Mar 27, 2018
2aee09c
Merge #11881: Remove Python2 support
laanwj Mar 28, 2018
97260e8
Merge #12787: rpc: Adjust ifdef to avoid unreachable code
laanwj Mar 29, 2018
1d13370
Merge #12849: Tests: Add logging in loops in p2p_sendhears.py
Apr 7, 2018
1f46de1
Merge #12618: Set SCHED_BATCH priority on the loadblk thread.
laanwj Apr 7, 2018
f22126d
Merge #12845: Trivial: Add logging line in init.cpp that was accident…
Apr 9, 2018
40964a5
Merge #13097: ui: Support wallets loaded dynamically
jonasschnelli May 18, 2018
160061d
Merge #13273: Qt/Bugfix: fix handling default wallet with no name
laanwj May 29, 2018
858a64f
Merge #13058: [wallet] `createwallet` RPC - create new wallet at runtime
jonasschnelli Jun 1, 2018
fe7e3f2
drop platformStyle
PastaPastaPasta Dec 16, 2020
06d3d77
use CWallet*
PastaPastaPasta Dec 16, 2020
5d48310
Merge #13506: Qt: load wallet in UI after possible init aborts
Jun 20, 2018
ea33d32
Merge #13512: [qa] mininode: Expose connection state through is_conne…
Jun 23, 2018
7e88cd6
More of 12240: Add missing ` (DEPRECATED)` strings
UdjinM6 Dec 16, 2020
c288eaa
More of 12567: Add missing datetime format changes to `LogTimestampStr`
UdjinM6 Dec 16, 2020
41b6572
More of 12747: fix typos
UdjinM6 Dec 16, 2020
50d893a
More of 12076
UdjinM6 Dec 16, 2020
f4f297a
Merge #12923: util: Pass pthread_self() to pthread_setschedparam inst…
laanwj Apr 9, 2018
41aaad6
More of 13506
UdjinM6 Dec 16, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion contrib/devtools/optimize-pngs.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ def content_hash(filename):
file_path = os.path.join(absFolder, file)
fileMetaMap = {'file' : file, 'osize': os.path.getsize(file_path), 'sha256Old' : file_hash(file_path)}
fileMetaMap['contentHashPre'] = content_hash(file_path)

try:
subprocess.call([pngcrush, "-brute", "-ow", "-rem", "gAMA", "-rem", "cHRM", "-rem", "iCCP", "-rem", "sRGB", "-rem", "alla", "-rem", "text", file_path],
stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL)
Expand Down
1 change: 0 additions & 1 deletion contrib/macdeploy/macdeployqtplus
Original file line number Diff line number Diff line change
Expand Up @@ -731,7 +731,6 @@ if config.dmg is not None:
hdiutil_args.append(str(value))

return run(hdiutil_args, universal_newlines=True)

if verbose >= 2:
if fancy is None:
print("+ Creating .dmg disk image +")
Expand Down
1 change: 0 additions & 1 deletion contrib/testgen/gen_base58_test_vectors.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,6 @@ def gen_invalid_vector(template, corrupt_prefix, randomize_payload_size, corrupt
prefix = os.urandom(1)
else:
prefix = bytearray(template[0])

if randomize_payload_size:
payload = os.urandom(max(int(random.expovariate(0.5)), 50))
else:
Expand Down
5 changes: 5 additions & 0 deletions doc/release-notes.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,11 @@ See detailed [set of changes](https://github.com/dashpay/dash/compare/v0.16.1.0.

- [`ccef3b4836`](https://github.com/dashpay/dash/commit/ccef3b48363d8bff4b919d9119355182e3902ef3) qt: Fix wallet encryption dialog (#3816)

Python Support
--------------

Support for Python 2 has been discontinued for all test files and tools.

Credits
=======

Expand Down
2 changes: 1 addition & 1 deletion src/addrman.h
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ class CAddrMan
// discriminate entries based on port. Should be false on mainnet/testnet and can be true on devnet/regtest
bool discriminatePorts;

//! Holds addrs inserted into tried table that collide with existing entries. Test-before-evict discpline used to resolve these collisions.
//! Holds addrs inserted into tried table that collide with existing entries. Test-before-evict discipline used to resolve these collisions.
std::set<int> m_tried_collisions;

protected:
Expand Down
25 changes: 21 additions & 4 deletions src/base58.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,24 @@

/** All alphanumeric characters except for "0", "I", "O", and "l" */
static const char* pszBase58 = "123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz";
static const int8_t mapBase58[256] = {
-1,-1,-1,-1,-1,-1,-1,-1, -1,-1,-1,-1,-1,-1,-1,-1,
-1,-1,-1,-1,-1,-1,-1,-1, -1,-1,-1,-1,-1,-1,-1,-1,
-1,-1,-1,-1,-1,-1,-1,-1, -1,-1,-1,-1,-1,-1,-1,-1,
-1, 0, 1, 2, 3, 4, 5, 6, 7, 8,-1,-1,-1,-1,-1,-1,
-1, 9,10,11,12,13,14,15, 16,-1,17,18,19,20,21,-1,
22,23,24,25,26,27,28,29, 30,31,32,-1,-1,-1,-1,-1,
-1,33,34,35,36,37,38,39, 40,41,42,43,-1,44,45,46,
47,48,49,50,51,52,53,54, 55,56,57,-1,-1,-1,-1,-1,
-1,-1,-1,-1,-1,-1,-1,-1, -1,-1,-1,-1,-1,-1,-1,-1,
-1,-1,-1,-1,-1,-1,-1,-1, -1,-1,-1,-1,-1,-1,-1,-1,
-1,-1,-1,-1,-1,-1,-1,-1, -1,-1,-1,-1,-1,-1,-1,-1,
-1,-1,-1,-1,-1,-1,-1,-1, -1,-1,-1,-1,-1,-1,-1,-1,
-1,-1,-1,-1,-1,-1,-1,-1, -1,-1,-1,-1,-1,-1,-1,-1,
-1,-1,-1,-1,-1,-1,-1,-1, -1,-1,-1,-1,-1,-1,-1,-1,
-1,-1,-1,-1,-1,-1,-1,-1, -1,-1,-1,-1,-1,-1,-1,-1,
-1,-1,-1,-1,-1,-1,-1,-1, -1,-1,-1,-1,-1,-1,-1,-1,
};

bool DecodeBase58(const char* psz, std::vector<unsigned char>& vch)
{
Expand All @@ -31,13 +49,12 @@ bool DecodeBase58(const char* psz, std::vector<unsigned char>& vch)
int size = strlen(psz) * 733 /1000 + 1; // log(58) / log(256), rounded up.
std::vector<unsigned char> b256(size);
// Process the characters.
static_assert(sizeof(mapBase58)/sizeof(mapBase58[0]) == 256, "mapBase58.size() should be 256"); // guarantee not out of range
while (*psz && !isspace(*psz)) {
// Decode base58 character
const char* ch = strchr(pszBase58, *psz);
if (ch == nullptr)
int carry = mapBase58[(uint8_t)*psz];
if (carry == -1) // Invalid b58 character
return false;
// Apply "b256 = b256 * 58 + ch".
int carry = ch - pszBase58;
int i = 0;
for (std::vector<unsigned char>::reverse_iterator it = b256.rbegin(); (carry != 0 || i < length) && (it != b256.rend()); ++it, ++i) {
carry += 58 * (*it);
Expand Down
5 changes: 3 additions & 2 deletions src/init.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ class DummyWalletInit : public WalletInitInterface {
bool ParameterInteraction() const override {return true;}
void RegisterRPC(CRPCTable &) const override {}
bool Verify() const override {return true;}
bool Open() const override {return true;}
bool Open() const override {LogPrintf("No wallet support compiled in!\n"); return true;}
void Start(CScheduler& scheduler) const override {}
void Flush() const override {}
void Stop() const override {}
Expand Down Expand Up @@ -778,6 +778,7 @@ void ThreadImport(std::vector<fs::path> vImportFiles)
{
const CChainParams& chainparams = Params();
RenameThread("dash-loadblk");
ScheduleBatchPriority();

{
CImportingNow imp;
Expand Down Expand Up @@ -1679,7 +1680,7 @@ bool AppInitMain()
}

if (!fLogTimestamps)
LogPrintf("Startup time: %s\n", DateTimeStrFormat("%Y-%m-%d %H:%M:%S", GetTime()));
LogPrintf("Startup time: %s\n", FormatISO8601DateTime(GetTime()));
LogPrintf("Default data directory %s\n", GetDefaultDataDir().string());
LogPrintf("Using data directory %s\n", GetDataDir().string());
LogPrintf("Using config file %s\n", GetConfigFile(gArgs.GetArg("-conf", BITCOIN_CONF_FILENAME)).string());
Expand Down
10 changes: 6 additions & 4 deletions src/logging.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -238,12 +238,14 @@ static std::string LogTimestampStr(const std::string &str, std::atomic_bool *fSt

if (*fStartedNewLine) {
int64_t nTimeMicros = GetTimeMicros();
strStamped = DateTimeStrFormat("%Y-%m-%d %H:%M:%S", nTimeMicros/1000000);
if (fLogTimeMicros)
strStamped += strprintf(".%06d", nTimeMicros%1000000);
strStamped = FormatISO8601DateTime(nTimeMicros/1000000);
if (fLogTimeMicros) {
strStamped.pop_back();
strStamped += strprintf(".%06dZ", nTimeMicros%1000000);
}
int64_t mocktime = GetMockTime();
if (mocktime) {
strStamped += " (mocktime: " + DateTimeStrFormat("%Y-%m-%d %H:%M:%S", mocktime) + ")";
strStamped += " (mocktime: " + FormatISO8601DateTime(mocktime) + ")";
}
strStamped += ' ' + str;
} else
Expand Down
41 changes: 27 additions & 14 deletions src/qt/dash.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,7 @@ public Q_SLOTS:
void shutdownResult();
/// Handle runaway exceptions. Shows a message box with the problem and quits the program.
void handleRunawayException(const QString &message);
void addWallet(WalletModel* walletModel);

Q_SIGNALS:
void requestedInitialize();
Expand All @@ -229,6 +230,7 @@ public Q_SLOTS:
#ifdef ENABLE_WALLET
PaymentServer* paymentServer;
std::vector<WalletModel*> m_wallet_models;
std::unique_ptr<interfaces::Handler> m_handler_load_wallet;
#endif
int returnValue;
std::unique_ptr<QWidget> shutdownWindow;
Expand Down Expand Up @@ -441,6 +443,22 @@ void BitcoinApplication::requestShutdown()
Q_EMIT requestedShutdown();
}

void BitcoinApplication::addWallet(WalletModel* walletModel)
{
#ifdef ENABLE_WALLET
window->addWallet(walletModel);

if (m_wallet_models.empty()) {
window->setCurrentWallet(walletModel->getWalletName());
}

connect(walletModel, SIGNAL(coinsSent(WalletModel*, SendCoinsRecipient, QByteArray)),
paymentServer, SLOT(fetchPaymentACK(WalletModel*, const SendCoinsRecipient&, QByteArray)));

m_wallet_models.push_back(walletModel);
#endif
}

void BitcoinApplication::initializeResult(bool success)
{
qDebug() << __func__ << ": Initialization result: " << success;
Expand All @@ -459,21 +477,13 @@ void BitcoinApplication::initializeResult(bool success)
window->setClientModel(clientModel);

#ifdef ENABLE_WALLET
bool fFirstWallet = true;
auto wallets = m_node.getWallets();
for (auto& wallet : wallets) {
WalletModel * const walletModel = new WalletModel(std::move(wallet), m_node, optionsModel);

window->addWallet(walletModel);
if (fFirstWallet) {
window->setCurrentWallet(walletModel->getWalletName());
fFirstWallet = false;
}
m_handler_load_wallet = m_node.handleLoadWallet([this](std::unique_ptr<interfaces::Wallet> wallet) {
QMetaObject::invokeMethod(this, "addWallet", Qt::QueuedConnection,
Q_ARG(WalletModel*, new WalletModel(std::move(wallet), m_node, optionsModel)));
});

connect(walletModel, SIGNAL(coinsSent(WalletModel*,SendCoinsRecipient,QByteArray)),
paymentServer, SLOT(fetchPaymentACK(WalletModel*,const SendCoinsRecipient&,QByteArray)));

m_wallet_models.push_back(walletModel);
for (auto& wallet : m_node.getWallets()) {
addWallet(new WalletModel(std::move(wallet), m_node, optionsModel));
}
#endif

Expand Down Expand Up @@ -565,6 +575,9 @@ int main(int argc, char *argv[])
// IMPORTANT if it is no longer a typedef use the normal variant above
qRegisterMetaType< CAmount >("CAmount");
qRegisterMetaType< std::function<void(void)> >("std::function<void(void)>");
#ifdef ENABLE_WALLET
qRegisterMetaType<WalletModel*>("WalletModel*");
#endif

/// 3. Application identification
// must be set before OptionsModel is initialized or translations are loaded,
Expand Down
17 changes: 0 additions & 17 deletions src/qt/guiutil.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -290,15 +290,6 @@ void setupAddressWidget(QValidatedLineEdit *widget, QWidget *parent, bool fAllow
widget->setCheckValidator(new BitcoinAddressCheckValidator(parent));
}

void setupAmountWidget(QLineEdit *widget, QWidget *parent)
{
QDoubleValidator *amountValidator = new QDoubleValidator(parent);
amountValidator->setDecimals(8);
amountValidator->setBottom(0.0);
widget->setValidator(amountValidator);
widget->setAlignment(Qt::AlignRight|Qt::AlignVCenter);
}

void setupAppearance(QWidget* parent, OptionsModel* model)
{
if (!QSettings().value("fAppearanceSetupDone", false).toBool()) {
Expand Down Expand Up @@ -423,14 +414,6 @@ bool parseBitcoinURI(const QUrl &uri, SendCoinsRecipient *out)

bool parseBitcoinURI(QString uri, SendCoinsRecipient *out)
{
// Convert dash:// to dash:
//
// Cannot handle this later, because dash:// will cause Qt to see the part after // as host,
// which will lower-case it (and thus invalidate the address).
if(uri.startsWith("dash://", Qt::CaseInsensitive))
{
uri.replace(0, 7, "dash:");
}
QUrl uriInstance(uri);
return parseBitcoinURI(uriInstance, out);
}
Expand Down
3 changes: 1 addition & 2 deletions src/qt/guiutil.h
Original file line number Diff line number Diff line change
Expand Up @@ -108,9 +108,8 @@ namespace GUIUtil
QString dateTimeStr(const QDateTime &datetime);
QString dateTimeStr(qint64 nTime);

// Set up widgets for address and amounts
// Set up widget for address
void setupAddressWidget(QValidatedLineEdit *widget, QWidget *parent, bool fAllowURI = false);
void setupAmountWidget(QLineEdit *widget, QWidget *parent);

// Setup appearance settings if not done yet
void setupAppearance(QWidget* parent, OptionsModel* model);
Expand Down
9 changes: 7 additions & 2 deletions src/qt/paymentserver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -396,7 +396,12 @@ void PaymentServer::handleURIOrFile(const QString& s)
return;
}

if (s.startsWith(BITCOIN_IPC_PREFIX, Qt::CaseInsensitive)) // dash: URI
if (s.startsWith("dash://", Qt::CaseInsensitive))
{
Q_EMIT message(tr("URI handling"), tr("'dash://' is not a valid URI. Use 'dash:' instead."),
CClientUIInterface::MSG_ERROR);
}
else if (s.startsWith(BITCOIN_IPC_PREFIX, Qt::CaseInsensitive)) // dash: URI
{
QUrlQuery uri((QUrl(s)));
if (uri.hasQueryItem("r")) // payment request URI
Expand Down Expand Up @@ -755,7 +760,7 @@ bool PaymentServer::verifyExpired(const payments::PaymentDetails& requestDetails
{
bool fVerified = (requestDetails.has_expires() && (int64_t)requestDetails.expires() < GetTime());
if (fVerified) {
const QString requestExpires = QString::fromStdString(DateTimeStrFormat("%Y-%m-%d %H:%M:%S", (int64_t)requestDetails.expires()));
const QString requestExpires = QString::fromStdString(FormatISO8601DateTime((int64_t)requestDetails.expires()));
qWarning() << QString("PaymentServer::%1: Payment request expired \"%2\".")
.arg(__func__)
.arg(requestExpires);
Expand Down
6 changes: 3 additions & 3 deletions src/qt/rpcconsole.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,7 @@ bool RPCConsole::RPCParseCommandLine(interfaces::Node* node, std::string &strRes
std::string method = stack.back()[0];
std::string uri;
#ifdef ENABLE_WALLET
if (walletID && !walletID->empty()) {
if (walletID) {
QByteArray encodedName = QUrl::toPercentEncoding(QString::fromStdString(*walletID));
uri = "/wallet/"+std::string(encodedName.constData(), encodedName.length());
}
Expand Down Expand Up @@ -422,7 +422,7 @@ void RPCExecutor::request(const QString &command, const QString &walletID)
return;
}
std::string wallet_id = walletID.toStdString();
if(!RPCConsole::RPCExecuteCommandLine(m_node, result, executableCommand, nullptr, &wallet_id))
if (!RPCConsole::RPCExecuteCommandLine(m_node, result, executableCommand, nullptr, walletID.isNull() ? nullptr : &wallet_id))
{
Q_EMIT reply(RPCConsole::CMD_ERROR, QString("Parse error: unbalanced ' or \""));
return;
Expand Down Expand Up @@ -1036,7 +1036,7 @@ void RPCConsole::on_lineEdit_returnPressed()
}

if (m_last_wallet_id != walletID) {
if (walletID.isEmpty()) {
if (walletID.isNull()) {
message(CMD_REQUEST, tr("Executing command without any wallet"));
} else {
message(CMD_REQUEST, tr("Executing command using \"%1\" wallet").arg(walletID));
Expand Down
2 changes: 1 addition & 1 deletion src/qt/test/uritests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ void URITests::uriTests()
QVERIFY(rv.address == QString("XwnLY9Tf7Zsef8gMGL2fhWA9ZmMjt4KPwg"));
QVERIFY(rv.label == QString());

QVERIFY(GUIUtil::parseBitcoinURI("dash://XwnLY9Tf7Zsef8gMGL2fhWA9ZmMjt4KPwg?message=Some Example Address", &rv));
QVERIFY(GUIUtil::parseBitcoinURI("dash:XwnLY9Tf7Zsef8gMGL2fhWA9ZmMjt4KPwg?message=Some Example Address", &rv));
QVERIFY(rv.address == QString("XwnLY9Tf7Zsef8gMGL2fhWA9ZmMjt4KPwg"));
QVERIFY(rv.label == QString());

Expand Down
9 changes: 7 additions & 2 deletions src/qt/walletframe.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,13 @@ bool WalletFrame::addWallet(WalletModel *walletModel)
walletView->setWalletModel(walletModel);
walletView->showOutOfSyncWarning(bOutOfSync);

/* TODO we should goto the currently selected page once dynamically adding wallets is supported */
walletView->gotoOverviewPage();
WalletView* current_wallet_view = currentWalletView();
if (current_wallet_view) {
walletView->setCurrentIndex(current_wallet_view->currentIndex());
} else {
walletView->gotoOverviewPage();
}

walletStack->addWidget(walletView);
mapWalletViews[name] = walletView;

Expand Down
21 changes: 17 additions & 4 deletions src/rpc/blockchain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -410,16 +410,22 @@ UniValue getdifficulty(const JSONRPCRequest& request)
std::string EntryDescriptionString()
{
return " \"size\" : n, (numeric) transaction size in bytes\n"
" \"fee\" : n, (numeric) transaction fee in " + CURRENCY_UNIT + "\n"
" \"modifiedfee\" : n, (numeric) transaction fee with fee deltas used for mining priority\n"
" \"fee\" : n, (numeric) transaction fee in " + CURRENCY_UNIT + " (DEPRECATED)\n"
" \"modifiedfee\" : n, (numeric) transaction fee with fee deltas used for mining priority (DEPRECATED)\n"
" \"time\" : n, (numeric) local time transaction entered pool in seconds since 1 Jan 1970 GMT\n"
" \"height\" : n, (numeric) block height when transaction entered pool\n"
" \"descendantcount\" : n, (numeric) number of in-mempool descendant transactions (including this one)\n"
" \"descendantsize\" : n, (numeric) size of in-mempool descendants (including this one)\n"
" \"descendantfees\" : n, (numeric) modified fees (see above) of in-mempool descendants (including this one)\n"
" \"descendantfees\" : n, (numeric) modified fees (see above) of in-mempool descendants (including this one) (DEPRECATED)\n"
" \"ancestorcount\" : n, (numeric) number of in-mempool ancestor transactions (including this one)\n"
" \"ancestorsize\" : n, (numeric) size of in-mempool ancestors (including this one)\n"
" \"ancestorfees\" : n, (numeric) modified fees (see above) of in-mempool ancestors (including this one)\n"
" \"ancestorfees\" : n, (numeric) modified fees (see above) of in-mempool ancestors (including this one) (DEPRECATED)\n"
" \"fees\" : {\n"
" \"base\" : n, (numeric) transaction fee in " + CURRENCY_UNIT + "\n"
" \"modified\" : n, (numeric) transaction fee with fee deltas used for mining priority in " + CURRENCY_UNIT + "\n"
" \"ancestor\" : n, (numeric) modified fees (see above) of in-mempool ancestors (including this one) in " + CURRENCY_UNIT + "\n"
" \"descendent\" : n, (numeric) number of in-mempool ancestor transactions (including this one) in " + CURRENCY_UNIT + "\n"
" }\n"
" \"depends\" : [ (array) unconfirmed transactions used as inputs for this transaction\n"
" \"transactionid\", (string) parent transaction id\n"
" ... ],\n"
Expand All @@ -433,6 +439,13 @@ void entryToJSON(UniValue &info, const CTxMemPoolEntry &e) EXCLUSIVE_LOCKS_REQUI
{
AssertLockHeld(mempool.cs);

UniValue fees(UniValue::VOBJ);
fees.pushKV("base", ValueFromAmount(e.GetFee()));
fees.pushKV("modified", ValueFromAmount(e.GetModifiedFee()));
fees.pushKV("ancestor", ValueFromAmount(e.GetModFeesWithAncestors()));
fees.pushKV("descendant", ValueFromAmount(e.GetModFeesWithDescendants()));
info.pushKV("fees", fees);

info.pushKV("size", (int)e.GetTxSize());
info.pushKV("fee", ValueFromAmount(e.GetFee()));
info.pushKV("modifiedfee", ValueFromAmount(e.GetModifiedFee()));
Expand Down
12 changes: 6 additions & 6 deletions src/rpc/rawtransaction.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1047,18 +1047,18 @@ UniValue signrawtransaction(const JSONRPCRequest& request)
new_request.params.push_back(request.params[1]);
new_request.params.push_back(request.params[3]);
return signrawtransactionwithkey(new_request);
}
// Otherwise sign with the wallet which does not take a privkeys parameter
} else {
#ifdef ENABLE_WALLET
else {
// Otherwise sign with the wallet which does not take a privkeys parameter
new_request.params.push_back(request.params[0]);
new_request.params.push_back(request.params[1]);
new_request.params.push_back(request.params[3]);
return signrawtransactionwithwallet(new_request);
}
#else
// If we have made it this far, then wallet is disabled and no private keys were given, so fail here.
throw JSONRPCError(RPC_INVALID_PARAMETER, "No private keys available.");
#endif
// If we have made it this far, then wallet is disabled and no private keys were given, so fail here.
throw JSONRPCError(RPC_INVALID_PARAMETER, "No private keys available.");
}
}

UniValue sendrawtransaction(const JSONRPCRequest& request)
Expand Down
Loading